Skip to content

Commit

Permalink
class library: provide adequate GUI for node proxies of numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
telephon committed Mar 11, 2015
1 parent e7f9aca commit afb1e13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion SCClassLibrary/JITLib/GUI/NdefParamGui.sc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ NdefParamGui : EnvirGui {
}

setFunc { |key|
^{ |sl| object.set(key, sl.value) }
^{ |sl|
if(key == 'number-source') {
object.source = sl.value
} {
object.set(key, sl.value)
}
}
}

clearField { |index|
Expand Down
6 changes: 6 additions & 0 deletions SCClassLibrary/JITLib/ProxySpace/ProxyInterfaces.sc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ StreamControl : AbstractPlayControl {
^true
}

controlNames {
^if(source.isNumber or: { source.isArray }) {
ControlName('number-source', defaultValue:source)
}
}

}


Expand Down

1 comment on commit afb1e13

@jamshark70
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this looks like a good approach. My only hesitation is that 'number-source' is inconvenient to type. I understand the logic behind it -- you might replace the numeric source with a synth that has arbitrary control names, so the numeric source should have a distinct name -- but it would be helpful if this could be friendlier toward live-coding. Maybe '#' instead of 'number-source'? Or perhaps addSpec could resolve nil to 'number-source' if the source is a number (but that would be a fix in quarks, not here)?

Please sign in to comment.