[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] SynthDefs, synthDefDir



On Sun, May 30, 2021 at 5:00 PM <clfest@xxxxxxxxxx> wrote:
> There seems to be some piece that I don't understand. When I copy, for
> example in
> Linux in the synthDefDir:
>
> cp -a fmgen_a_0.scsyndef 1111.scsyndef
>
> and reboot SCLang, when I browse:
>
> SynthDescLib.global.browse;
>
> 1111 does not show up although fmgen_a_0 does. Why not?

Ah, you're assuming that the SynthDef name comes from the filename.
That's not true.

The SynthDef name is part of the binary contents of the file. You
copied to a different filename, without changing the contents of the
file, so the SynthDef name *inside the file* is still named fmgen_a_0.
The filename is 100% irrelevant.

Consider that the normal case for transmitting a SynthDef to the
server is in an OSC message: `add` constructs a `/d_recv` message. In
this case -- the normal case! -- there is no filename, so it doesn't
make sense to assume that the filename provides the defname.

Also note that a scsyndef file can contain multiple SynthDefs --
usually it doesn't, but it is possible to create a package of several
SynthDefs in one file. Every SynthDef needs to have a unique name --
so, as there is only one filename, it would be impossible to infer
multiple defnames from it.

See also: http://doc.sccode.org/Reference/Synth-Definition-File-Format.html

> a synth-definition is :
>
>     pstring - the name of the synth definition
>     ... more

hjh

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/