<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/11/2013 08:53 AM, András Murányi
wrote:<br>
</div>
<blockquote
cite="mid:CAJtGUK6Mhjd4312jTCgqVwD3_fzKDYGjvvLcAa37rROfBgdtbw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>A couple of things concerning preset_hub:<br>
<br>
</div>
- It seems to me that sending "clear n" to preset_hub actually
clears two presets, the nth and the n+1st.<br>
</div>
</blockquote>
I just tested on the help file and tried hub's clear (which erases
the preset as expected), node's clearall (which is synonymous to
hub's clear), as well as node's clear (which only erases that node's
data at preset n), and they all worked as expected--if you can
construct a scenario where this fails without the assumption that
preset renumbers presets (which it currently doesn't support),
please send it to me so that I can investigate further.<br>
<blockquote
cite="mid:CAJtGUK6Mhjd4312jTCgqVwD3_fzKDYGjvvLcAa37rROfBgdtbw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>- Is it possible (and could you please make it possible)
to delete a preset in way that the preset numbers shift
accordingly? What I mean is:<br>
</div>
<div>preset 0: dog<br>
</div>
<div>preset 1: cat<br>
</div>
<div>preset 2: bee<br>
</div>
<div>preset 3: cow<br>
</div>
<div> upon "delete 1" would become:<br>
<div>preset 0: dog<br>
</div>
<div>preset 1: bee<br>
</div>
preset 2: cow<br>
</div>
<div>(I need this because I name the presets and then feed the
names to a popup, so when I delete a preset I need the
according element to disappear from the popup, with indexes
staying in sync.)<br>
</div>
</div>
</div>
</blockquote>
<br>
I think you are expecting preset to renumber presets (akin to coll
object) but I think that is a bad idea as that could wreak havoc in
other places where specific value is associated with specific
settings (e.g. presets can be connected to [sel n] kinds of
scenarios). It seems to me that what you may need is to keep preset
numbers associated with names inside coll object, so that way even
if you lose order of your presets, coll will keep their names
associated with proper values. So, for instance, coll could have a
structure:<br>
<br>
dog, 0;<br>
cat, 1;<br>
bee, 2;<br>
cow, 3;<br>
<br>
and later<br>
<br>
dog, 0;<br>
bee, 2;<br>
cow, 3;<br>
<br>
Therefore, feeding "bee" into coll will always yield the right value
when invoked from coll.<br>
<blockquote
cite="mid:CAJtGUK6Mhjd4312jTCgqVwD3_fzKDYGjvvLcAa37rROfBgdtbw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div> </div>
<div>- When I add [preset_hub $1] to an abstraction, save it,
close it, and reopen it, "$1" gets replaced by the value,
and becomes something like [preset_hub foo]. (It's also
visible in the raw source of the abstraction.) I hope this
is not by design because I need to reuse the abstraction...
:-o<br>
</div>
</div>
</div>
</blockquote>
This may be a bug, or more specifically current limitation--thanks
for reporting it. That said, You can simply give all your
abstractions the same scope (e.g. [preset_node] without any
arguments or with a custom one that you plan on using across the
entire ecosystem of all your patches), and have a preset_hub with
the same scope on a parent patch that hosts all these abstractions
will catch them all, including multiple instances of the same
abstraction (see K12 mode for examples). This allows reusing that is
arguably even simpler than what you're thinking of, although it does
have some limitations (e.g. limits you to one scope).<br>
<br>
HTH<br>
<br>
<blockquote
cite="mid:CAJtGUK6Mhjd4312jTCgqVwD3_fzKDYGjvvLcAa37rROfBgdtbw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div> <br>
</div>
<div>Thanks,<br>
</div>
<div><br clear="all">
András </div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
L2Ork-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:L2Ork-dev@disis.music.vt.edu">L2Ork-dev@disis.music.vt.edu</a>
<a class="moz-txt-link-freetext" href="http://disis.music.vt.edu/listinfo/l2ork-dev">http://disis.music.vt.edu/listinfo/l2ork-dev</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ivica Ico Bukvic, D.M.A
Composition, Music Technology
Director, DISIS Interactive Sound & Intermedia Studio
Director, L2Ork Linux Laptop Orchestra
Head, ICAT IMPACT Studio
Virginia Tech
Department of Music
Blacksburg, VA 24061-0240
(540) 231-6139
(540) 231-5034 (fax)
disis.music.vt.edu
l2ork.music.vt.edu
ico.bukvic.net</pre>
</body>
</html>