Csound Csound-dev Csound-tekno Search About

[Cs-dev] pvanal

Date2005-06-03 02:33
FromVictor Lazzarini
Subject[Cs-dev] pvanal
Is the pvocex part of pvanal code disabled at the moment?
I tried to test some changes to pvfileio.c and I needed
a pvocex file, but I couldn't create one (it seems to
be generating an old-style pvoc).

Victor


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 10:00
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] pvanal
It seems to have #if 0 wrapped round the relevant code.  No idea why.
I would have thought that pvocex files were the correct model, and the
other should not be created but still read for backwards compatibility
==John ffitch


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 10:06
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvanal
Perhaps because bits of the pvocex code still have statics. I started working
on it yesterday, pvfileio.c is good now. Istvan might know more I suppose.

Victor

At 10:00 03/06/2005, you wrote:
>It seems to have #if 0 wrapped round the relevant code.  No idea why.
>I would have thought that pvocex files were the correct model, and the
>other should not be created but still read for backwards compatibility
>==John ffitch
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Yahoo.
>Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
>Search APIs Find out how you can build Yahoo! directly into your own
>Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 10:10
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] pvanal
PS The code for display of pvanal frames also seems to have been
removed.  Shame as I used that.
==John ffitch


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 12:21
FromIstvan Varga
SubjectRe: [Cs-dev] pvanal
Victor Lazzarini wrote:

> Is the pvocex part of pvanal code disabled at the moment?

Yes, because the PVOC-EX system is not (yet) exported through the API
(and apparently needs a major clean-up), and pvanal, being a plugin
library, cannot use that interface, only API functions in ENVIRON.
The display code is commented out for the exact same reason.

> I tried to test some changes to pvfileio.c and I needed
> a pvocex file, but I couldn't create one (it seems to
> be generating an old-style pvoc).

What changes are you making to pvfileio.c ? I am currently working on
the same file to sort out issues like:
   * use of the non-ANSI file I/O functions (which reportedly cause
     performance problems on Mac systems due to reading/writing in
     small chunks of only a few bytes; the stdio interface is buffered
     and should work better)
   * makes the (wrong) assumption that sizeof(long) is always 4
   * may not work correctly on big-endian systems
   * much of ugly code duplication


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 12:42
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvanal
I have taken the two global static variables out and replaced them
with dynamic globals using your interface.

In fact one of the globals was a string error and I think it's better to 
get rid
of it completely and replace all its uses with csound->Message(). What I did
probalbly doesn't work and it's ugly anyway (it was late last night).

The problem I had was that pvsys_reset()  was causing a crash when
called by memRESET() from csoundReset() ( from csoundCreate()),
I reckoned because the globals did not exist. So I tried to check
if they were NULL, before accessing them but that did not work. That's
why I asked you about it.

Anyway, you can have a look at the code and decide if the changes I
made are worth keeping. I committed them last night.

Victor

At 12:21 03/06/2005, Istvan Varga wrote:
>What changes are you making to pvfileio.c ? I am currently working on
>the same file to sort out issues like:
>   * use of the non-ANSI file I/O functions (which reportedly cause
>     performance problems on Mac systems due to reading/writing in
>     small chunks of only a few bytes; the stdio interface is buffered
>     and should work better)
>   * makes the (wrong) assumption that sizeof(long) is always 4
>   * may not work correctly on big-endian systems
>   * much of ugly code duplication

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 12:52
From"istvan_v@mailbox.hu"
SubjectRe: [Cs-dev] pvanal
Victor Lazzarini wrote:

> In fact one of the globals was a string error and I think it's better to
> get rid
> of it completely and replace all its uses with csound->Message(). What I 
> did
> probalbly doesn't work and it's ugly anyway (it was late last night).

I think it would make sense to have negative integer error codes for each
error message, and the error function would return a string from an array
of type static const char *[] indexed by the absolute value of the error code.

Also, the variables may very well just be moved to ENVIRON (as the PVOC-EX
system is part of the engine) rather than using dynamic variables. The functions
need to be added to the API in ENVIRON as well, to be usable from plugins like
pvanal.c.


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 13:04
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvanal
Are you doing it, or would you like me to do this?

Victor

At 12:52 03/06/2005, you wrote:
>I think it would make sense to have negative integer error codes for each
>error message, and the error function would return a string from an array
>of type static const char *[] indexed by the absolute value of the error code.
>
>Also, the variables may very well just be moved to ENVIRON (as the PVOC-EX
>system is part of the engine) rather than using dynamic variables. The 
>functions
>need to be added to the API in ENVIRON as well, to be usable from plugins like
>pvanal.c.

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 13:18
FromIstvan Varga
SubjectRe: [Cs-dev] pvanal
Victor Lazzarini wrote:

> Are you doing it, or would you like me to do this?

I am currently just doing that, as well as merge changes in pvfileio.c.
Not sure however which functions need to be added to ENVIRON.


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 13:24
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvanal
Great; I'd the say in general we would need only
the ones that are called outside pvfileio.c, wouldn't we?

Victor

At 13:18 03/06/2005, you wrote:
>Victor Lazzarini wrote:
>
>>Are you doing it, or would you like me to do this?
>
>I am currently just doing that, as well as merge changes in pvfileio.c.
>Not sure however which functions need to be added to ENVIRON.
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Yahoo.
>Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
>Search APIs Find out how you can build Yahoo! directly into your own
>Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-03 18:10
FromIstvan Varga
SubjectRe: [Cs-dev] pvanal
I have now committed the changes to CVS. The following functions have
been added to the API (perhaps some are not needed while others are
missing, but this can be sorted out):

int (*PVOC_CreateFile)(struct ENVIRON_ *, const char *,
                        unsigned long, unsigned long, unsigned long,
                        unsigned long, long, int, int,
                        float, float *, unsigned long);
int (*PVOC_OpenFile)(struct ENVIRON_ *, const char *, void *, void *);
int (*PVOC_CloseFile)(struct ENVIRON_ *, int);
int (*PVOC_PutFrames)(struct ENVIRON_ *, int, const float *, long);
int (*PVOC_GetFrames)(struct ENVIRON_ *, int, float *, unsigned long);
int (*PVOC_FrameCount)(struct ENVIRON_ *, int);
int (*PVOC_Rewind)(struct ENVIRON_ *, int, int);
int (*pvxanal)(struct ENVIRON_ *, void *, void *, const char *, long, long,
                                   long, long, long, int, int);

Having pvxanal in ENVIRON, pvanal can write PVOC-EX files again.
I made extensive changes to pvfileio.c, moved the global variables to
ENVIRON (these include pvFileTable, pvNumFiles, and pvErrorCode), removed
dependencies on sizeof(long) being 4, made the code (hopefully, could
not test) work better on big-endian machines, and removed the limit of
maximum 16 files. It is possible that new bugs were introduced; a simple
test of creating a PVOC-EX file from a stereo sound file with pvanal, and
then reading it with the pvsfread opcode worked, but more extensive testing
is needed.

Victor Lazzarini wrote:

> Great; I'd the say in general we would need only
> the ones that are called outside pvfileio.c, wouldn't we?


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net