<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>hi list, hi miller,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've made a little patch to enable
externs</FONT></DIV>
<DIV><FONT face=Arial size=2>to modify the dsp chain while the dsp
processing</FONT></DIV>
<DIV><FONT face=Arial size=2>is running... this avoids to restart dsp
processing</FONT></DIV>
<DIV><FONT face=Arial size=2>when a parameter is changed, this is illustrated
</FONT></DIV>
<DIV><FONT face=Arial size=2>by the "spigot~" extern attached.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Without this patch, I had to restart dsp
processing</FONT></DIV>
<DIV><FONT face=Arial size=2>and all other dsp objects got
interrupted.</FONT></DIV>
<DIV><FONT face=Arial size=2>That was really annoying !!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What was made basically was adding the following
code :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><STRONG>d_ugen.c :</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>################################################</FONT></DIV>
<DIV><FONT face=Arial size=2> /* function to dynamically
change dsp functions parameters<BR>
arguments are :<BR> f : pointer to your dsp
function<BR> rank : rank of the argument to
change<BR> value : new value of this
parameter</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> QUITE
DANGEROUS !!! no checking is possible <BR>
because the number of arguments is not stored in dsp_chain
<BR> Copyleft <A
href="mailto:ydegoyon@free.fr">ydegoyon@free.fr</A> */<BR>void
dsp_mod(t_perfroutine f, int rank, int value )<BR>{<BR>
va_list ap;<BR> t_int *pdsp_chain =
dsp_chain;<BR> t_int i;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> while ( pdsp_chain
){<BR> if ( *pdsp_chain == (t_int)f
){<BR> *(pdsp_chain+rank)
= value;<BR> post (
"dsp_mod : warning : modifying dsp chain, better know what you're doing!!!!"
);<BR>
break;<BR>
}<BR> pdsp_chain++;<BR>
}<BR>}<BR>################################################</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This function has to be exported in
<STRONG>m_pd.h</STRONG> :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>################################################</FONT></DIV>
<DIV><FONT face=Arial size=2>EXTERN void dsp_mod(t_perfroutine f, int rank, int
value);<BR>################################################</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>An example of use is available in spigot~.c
attached.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is really dangerous to use this, </FONT></DIV>
<DIV><FONT face=Arial size=2>because it enables an extern to
transform</FONT></DIV>
<DIV><FONT face=Arial size=2>dsp_chain into a mess,</FONT></DIV>
<DIV><FONT face=Arial size=2>so use it with care !!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Yves Degoyon.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PS : it seems to be patch day, so I don't deliver
this as a patch</FONT></DIV>
<DIV><FONT face=Arial size=2>for incremental reasons ( I've applied some patches
myself ).</FONT></DIV></BODY></HTML>