jpcima / faustpp

A post-processor for faust, which allows to generate with more flexibility
Boost Software License 1.0
23 stars 3 forks source link

cid internal function incorrectly converts single-digit strings #13

Closed falkTX closed 2 years ago

falkTX commented 2 years ago

machine code aka symbols cannot start with numbers, so typically we use _1, _2 etc for those. problem in faustpp is that using cid("1") and cid("2") results in the same output, that being a single underscore.

this is seen in a real case with stuff like cid(w.meta.symbol|default(w.label)) and label is a single digit string.

obviously providing a symbol fixes the issue, but old/existing dsp files do not have it.

jpcima commented 2 years ago

For info, symbol is a custom attribute that faustpp refers to, never used by regular faust. It's there to permit attribute ID stability.

But you must be right regarding cid probably, i'll give that a look. In honesty, what i'm really having a look at is a python rewrite, this will simplify a lot of things.

falkTX commented 2 years ago

If possible to use only python built-ins would be nice.

The current faustpp binary, as user of it, works quite well tbh. It being a single, self-contained binary is quite nice.

jpcima commented 2 years ago

This would take care of the boost problem and the windows problem in one go, and not to mention the template library which actually is maintained.

jpcima commented 2 years ago

@falkTX the python rewrite is made, please give a it a try if you don't mind

falkTX commented 2 years ago

you rewrote it in a single day/night ?

was not expecting that at all! will try it later today

jpcima commented 2 years ago

It's a quite simple program. Largely untested yet, but output is looking alright

falkTX commented 2 years ago

well, it has been working quite nicely. what I feel is missing at the moment is standardizing the extra faustpp "extensions" so we can build consistent templates.

as I see it, we should be able to describe any property that a final plugin needs from faustpp. stuff like all author fields (homepage and email), lv2 and vst3 categories, parameter/port groups and similar.

jpcima commented 2 years ago

what I feel is missing at the moment is standardizing the extra faustpp "extensions" so we can build consistent templates.

Standardizing these attributes could definitely be useful to faust itself, if it implements these in its own plugin generators.

parameter/port groups and similar.

I certainly though about ports, but as far as i can tell, there does not yet exist a very clean way to assign attributes to Audio In and Outs.