<!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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG>d_ugen.c :</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>################################################</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; /* function to dynamically 
change dsp functions parameters<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
arguments are :<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f : pointer to your dsp 
function<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rank : rank of the argument to 
change<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value : new value of this 
parameter</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUITE 
DANGEROUS !!! no checking is possible <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
because the number of arguments is not stored in dsp_chain 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copyleft <A 
href="mailto:ydegoyon@free.fr">ydegoyon@free.fr</A> */<BR>void 
dsp_mod(t_perfroutine f, int rank, int value )<BR>{<BR>&nbsp;&nbsp;&nbsp; 
va_list ap;<BR>&nbsp;&nbsp;&nbsp; t_int *pdsp_chain = 
dsp_chain;<BR>&nbsp;&nbsp;&nbsp; t_int i;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; while ( pdsp_chain 
){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( *pdsp_chain == (t_int)f 
){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *(pdsp_chain+rank) 
= value;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; post ( 
"dsp_mod : warning : modifying dsp chain, better know what you're doing!!!!" 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pdsp_chain++;<BR>&nbsp;&nbsp;&nbsp; 
}<BR>}<BR>################################################</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Yves Degoyon.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>