<div dir="auto">Hi Mario and thanks for your response!<div dir="auto">Is it possible for a shred to receive an float argument, from Command Line, that is the Gain of the shred and so gradually and manually faing the shred?</div><div dir="auto">Thanks for answering my surely stupid question!</div><div dir="auto"><br></div><div dir="auto">Claudio</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il lun 1 giu 2020, 18:00 <<a href="mailto:chuck-users-request@lists.cs.princeton.edu">chuck-users-request@lists.cs.princeton.edu</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send chuck-users mailing list submissions to<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank" rel="noreferrer">chuck-users@lists.cs.princeton.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:chuck-users-request@lists.cs.princeton.edu" target="_blank" rel="noreferrer">chuck-users-request@lists.cs.princeton.edu</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:chuck-users-owner@lists.cs.princeton.edu" target="_blank" rel="noreferrer">chuck-users-owner@lists.cs.princeton.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of chuck-users digest..."<br>
Today's Topics:<br>
<br>
1. Re: Shreds fade out (mario buoninfante)<br>
<br><br><br>---------- Forwarded message ----------<br>From: mario buoninfante <<a href="mailto:mario.buoninfante@gmail.com" target="_blank" rel="noreferrer">mario.buoninfante@gmail.com</a>><br>To: <a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank" rel="noreferrer">chuck-users@lists.cs.princeton.edu</a><br>Cc: <br>Bcc: <br>Date: Sun, 31 May 2020 19:31:28 +0100<br>Subject: Re: [chuck-users] Shreds fade out<br>
<div>
<p>Hi Claudio,</p>
<p>I suspect ChucK just 'kills' the programs when you run <br>
</p>
<p>> chuck - 1</p>
<p>from terminal. What it does it's just sending the 'remove'
command to the Virtual Machine, so the program itself is not
really aware of what's going on.<br>
</p>
<p>If you want to fade the program out (or do any other operation)
before removing it, you must find a way to let it know first, if
that makes sense.</p>
<p>One solution could be to kill (and maybe launch as well) your
program from a different ChucK script (see Machine section here:
<a href="https://en.flossmanuals.net/chuck/_full/#standard-libraries" target="_blank" rel="noreferrer">https://en.flossmanuals.net/chuck/_full/#standard-libraries</a>), at
this point you could put the 2 in communication and have the
parent program sending an Event to the child before killing it, so
that the latter has the time to fade out and then 'remove' itself
(ie me.exit()).</p>
<p>One other way could be to have all your programs able to receive
msg via OSC. <br>
</p>
<p>Then you have a dedicate program that deals with removing them,
sending messages via OSC.</p>
<p>For example you can have a <a href="http://cleanup.ck" target="_blank" rel="noreferrer">cleanup.ck</a> program that simply takes
one argument (provided via terminal) that is the ID of the program
to remove.</p>
<p>For example:<br>
</p>
<p>> <a href="http://cleanup.ck:12" target="_blank" rel="noreferrer">cleanup.ck:12</a></p>
<p>to remove the program with the ID 12.<br>
</p>
<p>When this is launched it fires an OSC message that looks like
this: <br>
</p>
<p>"remove x" <br>
</p>
<p>where 'x' is the ID of the program to remove.</p>
<p>Now all the other "active" programs receive this message, but
only the one with the right ID will respond to it and maybe run
your cleanupAndLeave() function, that fades out and exits
(me.exit()).</p>
<p>This of course means that all your other programs need to have a
simple parser that deals with the incoming OSC msg.<br>
</p>
<p><br>
</p>
<p>Of course I don't know anything about the context here, so these
solutions could be not suitable for you.</p>
<p>Maybe if you share a bit more about how and why you're trying to
achieve this, we'd be able to provide a bit more support.</p>
<p><br>
</p>
<p>Hope this helps, anyway.<br>
</p>
<p><br>
</p>
<p>Cheers,</p>
<p>Mario<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>On 30/05/2020 23:33, Claudio Donaggio
wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div style="font-family:sans-serif;font-size:12.8px" dir="auto">
<div style="width:328px;margin:16px 0px">
<div><br>
<br>
Hi all!<br>
I was wondering if there is a way to smoothly fade out a
shred. Example: from command line you add a shred with
chuck + <a href="http://shred.ck/" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank" rel="noreferrer">shred.ck</a> and remove it with
chuck - 1. But when you remove the shred or replace it
gets cut off instantly. I am sure there is a way to
dinamically scale the gain from 1 to 0 smoothly before
remove the shred, but I do not have a clue on how to go
about it...<br>
Thanks!<br>
Claudio<br>
<br>
Inviato dal mio dispositivo mobile Huawei</div>
</div>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
chuck-users mailing list
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank" rel="noreferrer">chuck-users@lists.cs.princeton.edu</a>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank" rel="noreferrer">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank" rel="noreferrer">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>