Csound Csound-dev Csound-tekno Search About

[Cs-dev] ftfree

Date2005-08-03 10:48
FromSteven Yi
Subject[Cs-dev] ftfree
AttachmentsNone  

Date2005-08-03 12:07
FromIstvan Varga
SubjectRe: [Cs-dev] ftfree
For freeing a table with a known number, you can just use csound->hfgens()
with a negative table number which will request deleting the table, and
this should work from plugins. Alternatively, it may make sense to write
a version of the ftgen opcode that automatically deletes the table at
note deinit. It should be possible to implement that opcode as a plugin
(actually, ftgen may be moved out of fgens.c as well).

Steven Yi wrote:

> I'm working on ftree now and am putting it in fgens.c and adding a
> struct to ftgen.h, and plan to add it to entry1.c.  or entry2.c,
> wherever ftgen is at. The reason I'm doing this within csound and not
> as a plugin is that I haven't found any API functions which can do
> this.  I'm using the code from hfgens:
> 
> if (ff->fno > csound->maxfnum ||
>           (ftp = csound->flist[ff->fno]) == NULL) {
>         fterror(csound, ff, Str("ftable does not exist"));
>         return -1;
>       }
>       csound->flist[ff->fno] = NULL;
>       mfree(csound, (void*) ftp);
> 
> (with the ff->fno coming from *p instead) to free the table.  Does
> this all sound alright or is there an API way to do this? (And if not,
> should there be?)


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-03 12:28
FromSteven Yi
SubjectRe: [Cs-dev] ftfree
AttachmentsNone  

Date2005-08-03 13:01
FromSteven Yi
SubjectRe: [Cs-dev] ftfree
AttachmentsNone  

Date2005-08-03 13:09
FromSteven Yi
SubjectRe: [Cs-dev] ftfree
AttachmentsNone  

Date2005-08-03 14:18
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] ftfree
I thought one can also delete a table with event, giving an empty definition?
==John ffitch


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-03 18:41
FromSteven Yi
SubjectRe: [Cs-dev] ftfree
AttachmentsNone  

Date2005-08-03 19:14
FromRichard Dobson
SubjectRe: [Cs-dev] ftfree
This will be a useful facility: bearing in mind one of my interests, will this 
auto-deallocate work OK with legato notes (neg p3)? I am just speculating here, 
but it is possible one may want the ftable to survive until the end of the last 
note in a legato sequence.


Richard Dobson


Steven Yi wrote:

> I like that the ftable will clean itself up and timed exactly at note
> deinitialization, and I think that I prefer to have it in an opcode as
> the intention then is very clearn in the code and syntax-wise would
> also be less Csound code to write within the instrument body.
> 
> Either way, it seems Istvan has gone and done the job I stopped on and
> has moved out the opcodes to its own library, as well as left in
> ftfree and created ftgentmp.  Also by looking at his code I realized I
> did the code incorrectly anyways doing it the old way with the 4th
> function pointer in the OENTRY instead of the new
> RegisterDeinitCallback.  Thanks very much Istvan for this, it's very
> useful to me and I appreciate it!
> 
> steven
> 
> 
> 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-03 19:30
FromSteven Yi
SubjectRe: [Cs-dev] ftfree
AttachmentsNone  

Date2005-08-03 20:09
FromIstvan Varga
SubjectRe: [Cs-dev] ftfree
Richard Dobson wrote:

> This will be a useful facility: bearing in mind one of my interests, 
> will this auto-deallocate work OK with legato notes (neg p3)? I am just 
> speculating here, but it is possible one may want the ftable to survive 
> until the end of the last note in a legato sequence.

The deinit callback is called by deact() when the note is deactivated
and removed from the list of active instrument instances. This does not
happen in the case of "tied" notes, so the callback is really only called
at the end of the last note.
However, one should be careful about using this facility with tie/reinit,
as for every successful call of csound->RegisterDeinitCallback(), there
will be one call to the registered function, meaning that the callback
registration will accumulate.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-03 20:13
FromIstvan Varga
SubjectRe: [Cs-dev] ftfree
Steven Yi wrote:

> I too very much enjoy the legato feature of csound (I learned a great
> deal from your Csound Book chapter when I first went to learn how to
> use it!), and since Istvan left in the ftfree, I think it will be no
> problem to only deallocate at the last note.  I know with my
> instruments that use tied notes, it can detect if it's the first note
> of the sequence (tival == false and p3 < 0) so one could use ftgen
> with that note, and then check if tival == true and p3 > 0 to detect
> the end note of the sequence and call ftfree.  If not a tied note at
> all, then could just use ftgentmp.

You can also skip ftgentmp with tigoto - it will then create one table
at the beginning of the first note, and delete it when the last note in
the tied sequence is deactivated. Otherwise, it creates a new table on
every new tied note, and deletes all at once at the end of the last note.

By the way, ftgentmp currently only deletes tables with an automatic
number (p1=0); should this be changed ?


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-03 20:42
FromJean Piché
Subject[Cs-dev] Questions for developpers re: Cecilia & CS5

I have not really been following the disussions in the group so the  
answers to my questions may already be known. I have been working on  
a host of pretty nice modules for the next release of Cecilia  and  
would love to port to CS5 as soon as feasible.

How close are we to a bullet-proof (as opposed to canonball-proof)  
OSX release?

1- Are the Unix pipelines the same as in the CS4 implementation (-L  
flag) and are they functional now?

2- Is the launch argument structure the same as in CS4?

3- Are there many deprecated opcodes?

4- Are there substantial differences in how the orchestra and score  
codes are specified?

Thank you all in advance!

hope everyone is having a wonderful summer...

jp




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-03 21:44
FromSteven Yi
SubjectRe: [Cs-dev] ftfree
AttachmentsNone  

Date2005-08-04 00:41
FromAnthony Kozar
SubjectRe: [Cs-dev] Questions for developpers re: Cecilia & CS5
Hi Jean, 

I will answer the questions that I know how to.

On 8/3/05 3:42 PM, Jean Piché  etched in stone:

> 1- Are the Unix pipelines the same as in the CS4 implementation (-L
> flag) and are they functional now?

I would think this should work.  But I have not tested it myself.  If it
does not work, it is probably just a matter of fixing some #ifdefs.

> 2- Is the launch argument structure the same as in CS4?

Most of the command-line arguments are the same.  There are several new ones
but the ones you need to look out for are real-time audio and midi flags.
These take many new arguments that can specify devices by name, etc.

> 3- Are there many deprecated opcodes?

I don't think so.  One goal of Cs5 is 100% backwards compatibility with Cs4
orchestras.  There are many new opcodes though including syncing up with
some of the "missing" opcodes that were previously only in CsoundAV and
MacCsound.

> 4- Are there substantial differences in how the orchestra and score
> codes are specified?

No real changes here (that I am aware of).  Istvan did add a new variable
type (S-type for string variables).  There are many new and significant
opcodes for fsigs (the streaming phase vocoder type), so if Cecilia does not
have good support for that, now might be a good time to look at it.

In general the most significant changes from Cecilia's point of view might
be that Csound no longer has to be run as a command-line program and that
many opcodes will now be in separate, loadable libraries.  Csound 5 will be
distributed as a shared library that any program can interface with
directly.  While you can continue to "shell out" to csound from Cecilia, it
is possible that you would gain significant advantages by creating a
Tcl-wrapper for the Csound C API, and then making calls to the library in
your Tcl code.

As far as the opcodes go, maintaining Cecilia's context-sensitive help might
be more challenging with so many opcodes being dynamically loaded.  I have
made brief arguments before for some kind of introspection in the Csound API
or metadata in the opcode libraries themselves so that hosts such as Cecilia
will always be "up-to-date" with whatever opcode libraries are installed in
a particular user's system.  I do not think that there has been any progress
on that front though.


Anthony Kozar
anthonykozar@sbcglobal.net
http://akozar.spymac.net/



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-08-04 07:50
FromDavid Akbari
SubjectRe: [Cs-dev] Questions for developpers re: Cecilia & CS5
On Aug 3, 2005, at 7:41 PM, Anthony Kozar wrote:
> so that hosts such as Cecilia will always be "up-to-date" with 
> whatever opcode libraries are installed in a particular user's system.

Could there exist the potential for a user to add manual entries / 
contextual help when necessary? Maybe just building an interface for 
this functionality... Tcl/Tk would be great for that. Java could also 
be a good choice.


-David



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net