Csound Csound-dev Csound-tekno Search About

[Cs-dev] Advice sought for CS6

Date2013-05-31 10:04
Fromjpff@cs.bath.ac.uk
Subject[Cs-dev] Advice sought for CS6
Two questions that we thought might be good to seek the community views.

1: Initialisation of arrays.

We now have statements like
kT[] = fillarray(1,2,3,4)
working.  Some concern was expressed about the long-windedness on this. 
It has been suggested that we use the simpler/shorter
kT[] = array(1,2,3,4)
or we could seek some other syntax.  As far as we can tell the form
kT[] = [1,2,3,4]
is problematic, but we could (for effort) introduce something like
kT[] = '[1,2,3,4]
but is it worth it and would that be clear anyway?

No promises as to what we eventually do but what would be best for users?


2:  Strings in Scores

The question relates to escaped characters.  Currently the string

"abc\n"

is stored as 5 characters. If it is used in an instrument to print then
the printkS or hatever interprets the \n as a newline.

The alternative is to store this as 4 characters and do the interpretation
of escapes at read time.  The down side is that to print a \ character
this way would require 4 \s in the score (that is "\\\\").  However then "
could be included in a string.  It is unclear to me which is best.

Any thoughts?

==John ff


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-05-31 10:08
Frompeiman khosravi
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
Dear John,

On 31 May 2013 10:04, <jpff@cs.bath.ac.uk> wrote:
Two questions that we thought might be good to seek the community views.

1: Initialisation of arrays.

kT[] = [1,2,3,4]

I would be in favour of the above.
 
Best,
Peiman



Date2013-05-31 10:11
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Advice sought for CS6
> Dear John,
>
> On 31 May 2013 10:04,  wrote:
>
>> Two questions that we thought might be good to seek the community views.
>>
>> 1: Initialisation of arrays.
>>
>>
> kT[] = [1,2,3,4]
>>
>> I would be in favour of the above.
>
> Best,
> Peiman
>

That is the version you cannot have!  It causes way too many parsing
problems or did when we tried before.  I can look at it I suppose....



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-05-31 10:15
Frompeiman khosravi
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
Oh, sorry I missed that part! 

I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean that the size is automatically set?

Thanks
Peiman






www.peimankhosravi.co.uk || Subscribe to RSS Feed

To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



On 31 May 2013 10:11, <jpff@cs.bath.ac.uk> wrote:
> Dear John,
>
> On 31 May 2013 10:04, <jpff@cs.bath.ac.uk> wrote:
>
>> Two questions that we thought might be good to seek the community views.
>>
>> 1: Initialisation of arrays.
>>
>>
> kT[] = [1,2,3,4]
>>
>> I would be in favour of the above.
>
> Best,
> Peiman
>

That is the version you cannot have!  It causes way too many parsing
problems or did when we tried before.  I can look at it I suppose....



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-05-31 10:25
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Advice sought for CS6
> Oh, sorry I missed that part!
>
> I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is
> not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean
> that the size is automatically set?
>

Yes, but only 1D arrays at present



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-05-31 10:29
FromOeyvind Brandtsegg
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
Agreed, afaics
kT[] = array(1,2,3,4)
will work well.

And for the string question, I think the current way of storing
"abc\n"
as 5 caracters is a good solution.
For the lack of ability to include " in a string, we can still use ' for the same functional purpose (Yes?)

best
Oeyvind



2013/5/31 peiman khosravi <peimankhosravi@gmail.com>
Oh, sorry I missed that part! 

I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean that the size is automatically set?

Thanks
Peiman






www.peimankhosravi.co.uk || Subscribe to RSS Feed

To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



On 31 May 2013 10:11, <jpff@cs.bath.ac.uk> wrote:
> Dear John,
>
> On 31 May 2013 10:04, <jpff@cs.bath.ac.uk> wrote:
>
>> Two questions that we thought might be good to seek the community views.
>>
>> 1: Initialisation of arrays.
>>
>>
> kT[] = [1,2,3,4]
>>
>> I would be in favour of the above.
>
> Best,
> Peiman
>

That is the version you cannot have!  It causes way too many parsing
problems or did when we tried before.  I can look at it I suppose....



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Date2013-05-31 10:29
Frompeiman khosravi
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
That's OK, I only have a 1D brain anyway!






www.peimankhosravi.co.uk || Subscribe to RSS Feed

To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



On 31 May 2013 10:25, <jpff@cs.bath.ac.uk> wrote:
> Oh, sorry I missed that part!
>
> I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is
> not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean
> that the size is automatically set?
>

Yes, but only 1D arrays at present



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-05-31 10:48
Frompeiman khosravi
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
The problem with this is that then there won't be any way of passing arrays in p-fields. Now if [...] was accepted then it could also be used in the score. 

P






www.peimankhosravi.co.uk || Subscribe to RSS Feed

To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



On 31 May 2013 10:15, peiman khosravi <peimankhosravi@gmail.com> wrote:
Oh, sorry I missed that part! 

I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean that the size is automatically set?

Thanks
Peiman






www.peimankhosravi.co.uk || Subscribe to RSS Feed

To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



On 31 May 2013 10:11, <jpff@cs.bath.ac.uk> wrote:
> Dear John,
>
> On 31 May 2013 10:04, <jpff@cs.bath.ac.uk> wrote:
>
>> Two questions that we thought might be good to seek the community views.
>>
>> 1: Initialisation of arrays.
>>
>>
> kT[] = [1,2,3,4]
>>
>> I would be in favour of the above.
>
> Best,
> Peiman
>

That is the version you cannot have!  It causes way too many parsing
problems or did when we tried before.  I can look at it I suppose....



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-05-31 10:48
FromEdward Costello
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  None  None  

Date2013-05-31 10:59
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Advice sought for CS6
> The problem with this is that then there won't be any way of passing
> arrays
> in p-fields. Now if [...] was accepted then it could also be used in the
> score.
>

Score syntax is a totally different issue.  I have stsrted a revised score
parser where things are different.  Adding such syntax is not hard there;
using it is much harder
==John


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-05-31 11:07
Frompeiman khosravi
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
Great news. I think in this case the syntax should be unified across the csd, if possible. 

Best,
Peiman






www.peimankhosravi.co.uk || Subscribe to RSS Feed

To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



On 31 May 2013 10:59, <jpff@cs.bath.ac.uk> wrote:
> The problem with this is that then there won't be any way of passing
> arrays
> in p-fields. Now if [...] was accepted then it could also be used in the
> score.
>

Score syntax is a totally different issue.  I have stsrted a revised score
parser where things are different.  Adding such syntax is not hard there;
using it is much harder
==John


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-05-31 20:46
Fromjoachim heintz
SubjectRe: [Cs-dev] Advice sought for CS6
thanks very much for the question first!

as peiman and oeyvind i am also in favour of
kT[] = array(1,2,3,4)
if the simple
kT[] = [1,2,3,4]
is not possible because of parsing issues.

as to the strings, i'd like to ask if this would be currently possible:
"abc\"myfile.wav\"\n"?
if so, i think it might be the best solution.

	joachim



Am 31.05.2013 11:04, schrieb jpff@cs.bath.ac.uk:
> Two questions that we thought might be good to seek the community views.
>
> 1: Initialisation of arrays.
>
> We now have statements like
> kT[] = fillarray(1,2,3,4)
> working.  Some concern was expressed about the long-windedness on this.
> It has been suggested that we use the simpler/shorter
> kT[] = array(1,2,3,4)
> or we could seek some other syntax.  As far as we can tell the form
> kT[] = [1,2,3,4]
> is problematic, but we could (for effort) introduce something like
> kT[] = '[1,2,3,4]
> but is it worth it and would that be clear anyway?
>
> No promises as to what we eventually do but what would be best for users?
>
>
> 2:  Strings in Scores
>
> The question relates to escaped characters.  Currently the string
>
> "abc\n"
>
> is stored as 5 characters. If it is used in an instrument to print then
> the printkS or hatever interprets the \n as a newline.
>
> The alternative is to store this as 4 characters and do the interpretation
> of escapes at read time.  The down side is that to print a \ character
> this way would require 4 \s in the score (that is "\\\\").  However then "
> could be included in a string.  It is unclear to me which is best.
>
> Any thoughts?
>
> ==John ff
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-05-31 21:19
FromBen Hackbarth
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
john,

i'd prefer to see kT[] = [1,2,3,4] too, but i agree that this is ok: kT[] = array(1,2,3,4)

couldn't orchestral md arrays be easily parsed as: array([1,2], [3,4]) ?

regarding strings, i agree with joachim that a backslash escape character is sufficient for those who wish to include " in a string.

--  ben


On Fri, May 31, 2013 at 11:25 AM, <jpff@cs.bath.ac.uk> wrote:
> Oh, sorry I missed that part!
>
> I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is
> not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean
> that the size is automatically set?
>

Yes, but only 1D arrays at present



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-06-01 02:55
FromRichard Henninger
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
Might the classic c/C++/C# array initializer of curved braces be doable in this context?
 as in kT[] = {1,2,3,4} ?
 
Is there some corner in the parser that makes this hard? Nesting of braces could signify > 1D as in kT[][] = {{1,2,3,4}, {5,6,7,8}}
 
 
Richard Henninger
richard@rghmusic.com
 
From: jpff@cs.bath.ac.uk
Sent: ‎Friday‎, ‎May‎ ‎31‎, ‎2013 ‎5‎:‎05‎ ‎AM
To: csound-devel@lists.sourceforge.net
 
Two questions that we thought might be good to seek the community views.

1: Initialisation of arrays.

We now have statements like
kT[] = fillarray(1,2,3,4)
working.  Some concern was expressed about the long-windedness on this.
It has been suggested that we use the simpler/shorter
kT[] = array(1,2,3,4)
or we could seek some other syntax.  As far as we can tell the form
kT[] = [1,2,3,4]
is problematic, but we could (for effort) introduce something like
kT[] = '[1,2,3,4]
but is it worth it and would that be clear anyway?

No promises as to what we eventually do but what would be best for users?


2:  Strings in Scores

The question relates to escaped characters.  Currently the string

"abc\n"

is stored as 5 characters. If it is used in an instrument to print then
the printkS or hatever interprets the \n as a newline.

The alternative is to store this as 4 characters and do the interpretation
of escapes at read time.  The down side is that to print a \ character
this way would require 4 \s in the score (that is "\\\\").  However then "
could be included in a string.  It is unclear to me which is best.

Any thoughts?

==John ff


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2013-06-03 01:19
FromDavidWorrall
SubjectRe: [Cs-dev] Advice sought for CS6
AttachmentsNone  None  
Hi John.
I'm just scanning the list at present, so perhaps I've missed something...

I was wondering if  kT[]=[1,2,3,4] is more likely to cause mental 'bugs' for those using Python than kT= array(1,2,3,5) 

Of course, assignment in the form of "kT[]=" is not valid Python syntax.

I was also wondering if there is any speed etc to be gained by making a distinction between mutable an immutable arrays.

David

On 01/06/2013, at 6:19 AM, Ben Hackbarth wrote:

john,

i'd prefer to see kT[] = [1,2,3,4] too, but i agree that this is ok: kT[] = array(1,2,3,4)

couldn't orchestral md arrays be easily parsed as: array([1,2], [3,4]) ?

regarding strings, i agree with joachim that a backslash escape character is sufficient for those who wish to include " in a string.

--  ben


On Fri, May 31, 2013 at 11:25 AM, <jpff@cs.bath.ac.uk> wrote:
> Oh, sorry I missed that part!
>
> I think kT[] = '[1,2,3,4] is confusing so if the simple square brackets is
> not possible then I guess kT[] = array(1,2,3,4) would do. Does this mean
> that the size is automatically set?
>

Yes, but only 1D arrays at present



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

_____________________________________________
Dr David Worrall
Experimental Composer, Polymedia
Adjunct Senior Research Fellow, Australian National University
Board Member, International Community for Auditory Display
Regional Editor, Organised Sound (CUP) 
worrall.avatar.com.au sonification.com.au