Csound Csound-dev Csound-tekno Search About

[Cs-dev] line in rdscor.c

Date2012-04-15 18:52
FromVictor Lazzarini
Subject[Cs-dev] line in rdscor.c
In rdscor.c:70,  I see

 *pfld = ((int[4]){SSTRCOD,SSTRCOD1,SSTRCOD2,SSTRCOD3})[n]; /* flag with hifloat */

What's the SSTRCOD1 etc for? Is this an attempt to have more strings in the score event?
I see the equivalent code in sread.c is commented out as "dubious code".

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




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-15 19:41
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] line in rdscor.c
> In rdscor.c:70,  I see
>
>  *pfld = ((int[4]){SSTRCOD,SSTRCOD1,SSTRCOD2,SSTRCOD3})[n]; /* flag with
> hifloat */
>
> What's the SSTRCOD1 etc for? Is this an attempt to have more strings in
> the score event?
> I see the equivalent code in sread.c is commented out as "dubious code".
>

Precisely.  I wrote this and thought it worked for a while.  Problems
emerged so I backed off and never got back to finish / debug it
==John ff



------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-15 20:06
FromVictor Lazzarini
SubjectRe: [Cs-dev] line in rdscor.c
yes, it looks like we can make it work. 
I was thinking of this design:

1) each p-field containing a string holds SSTRCOD, there can be any of these
2) a count of SSTRCOD instances is taken
3) the score event holds a list of strings with these p-fields, which is indexed in
incrementing p-field order.

what do you think?

Victor
On 15 Apr 2012, at 19:41, jpff@cs.bath.ac.uk wrote:

>> In rdscor.c:70,  I see
>> 
>> *pfld = ((int[4]){SSTRCOD,SSTRCOD1,SSTRCOD2,SSTRCOD3})[n]; /* flag with
>> hifloat */
>> 
>> What's the SSTRCOD1 etc for? Is this an attempt to have more strings in
>> the score event?
>> I see the equivalent code in sread.c is commented out as "dubious code".
>> 
> 
> Precisely.  I wrote this and thought it worked for a while.  Problems
> emerged so I backed off and never got back to finish / debug it
> ==John ff
> 
> 
> 
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-15 21:00
FromTito Latini
SubjectRe: [Cs-dev] line in rdscor.c
AttachmentsNone  

Date2012-04-15 23:29
FromVictor Lazzarini
SubjectRe: [Cs-dev] line in rdscor.c
How high does SSTRCOD need to be, as it will limit the max value for a p-field?

Vicor
On 15 Apr 2012, at 21:00, Tito Latini wrote:

> On Sun, Apr 15, 2012 at 08:06:33PM +0100, Victor Lazzarini wrote:
>> yes, it looks like we can make it work. 
>> I was thinking of this design:
>> 
>> 1) each p-field containing a string holds SSTRCOD, there can be any of these
>> 2) a count of SSTRCOD instances is taken
>> 3) the score event holds a list of strings with these p-fields, which is indexed in
>> incrementing p-field order.
>> 
>> what do you think?
> 
> The strings can be repeated
> 
>  i1 0 1 "foo" "bar" "baz"
>  i1 + . "foo" "bar" "baz"
>  i1 + . "foo" "bar" "baz"
>  ...
> 
> therefore is efficient a hash table for the strings used by the score.
> 
> It is created during the sorting and the pfield with the string
> is replaced with the hash value + SSTRCOD (a MYFLT number).
> 
> Every hash value is a node in an ordered binary tree, used to get
> the string during the score processing (if the pfield > SSTRCOD,
> it is a string related to value-SSTRCOD in the binary tree).
> 
> tito
> 
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-04-16 06:58
FromTito Latini
SubjectRe: [Cs-dev] line in rdscor.c
AttachmentsNone  

Date2012-04-16 07:04
FromTito Latini
SubjectRe: [Cs-dev] line in rdscor.c
AttachmentsNone  

Date2012-04-16 07:18
FromTito Latini
SubjectRe: [Cs-dev] line in rdscor.c
AttachmentsNone