Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skin color aliases #1649

Closed
baconpaul opened this issue Mar 21, 2020 · 2 comments · Fixed by #1655
Closed

Skin color aliases #1649

baconpaul opened this issue Mar 21, 2020 · 2 comments · Fixed by #1655
Labels
Skinning Engine Issues related to Surge's skin engine

Comments

@baconpaul
Copy link
Collaborator

Per convo with Dave
Define colors by a name so you can reuse them in the xml

@baconpaul baconpaul added the Skinning Engine Issues related to Surge's skin engine label Mar 21, 2020
baconpaul added a commit to baconpaul/surge that referenced this issue Mar 21, 2020
You can refer to another color as a color value with $foo. You
can define any color you want with <color id="foo" value="#32323"/>.
Don't use circular definitinos since that will explode.

Addresses surge-synthesizer#1649
@baconpaul
Copy link
Collaborator Author

@itsmedavep pushing feature which lets you do something like this

 <color id="reddish" value="#22FF00"/>
    
    <color id="lfo.waveform.fill" value="#335544"/>
    <color id="lfo.waveform.font" value="$reddish"/>
    <color id="lfo.waveform.rules" value="$reddish"/>
    <color id="lfo.waveform.envelope" value="#A09090"/>
    <color id="lfo.waveform.wave" value="$reddish"/>

( I know my 'reddish' is very green in that example - I was changing it to test).

You can use $ with any name. So you can also do

    <color id="lfo.waveform.wave" value="$lfo.waveform.fill"/>

if you want. And you can define a color with any symbol you like really.

baconpaul added a commit that referenced this issue Mar 21, 2020
You can refer to another color as a color value with $foo. You
can define any color you want with <color id="foo" value="#32323"/>.
Don't use circular definitinos since that will explode.

Addresses #1649
@baconpaul
Copy link
Collaborator Author

So this all works but I'm keeping it open since loops blow you up. And I should make it so those loops shouldn't.

baconpaul added a commit to baconpaul/surge that referenced this issue Mar 21, 2020
No, I don't want no loops. A loop is a color whose defined
recursively. But if that recursion comes back round to myself
I used to crash badly.

Closes surge-synthesizer#1649
@baconpaul baconpaul mentioned this issue Mar 21, 2020
baconpaul added a commit that referenced this issue Mar 22, 2020
No, I don't want no loops. A loop is a color whose defined
recursively. But if that recursion comes back round to myself
I used to crash badly.

Closes #1649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skinning Engine Issues related to Surge's skin engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant