Adding a second action to a button
-
@d-healey Yes Ai is what I am using to try teaching myself and getting code. The problem with it, is it usually gives wrong answers for an hour until i provide enough error feedback for it to get something right.
-
@pcs800
Doing the parameter dump, I see this.
So I would use:
{
// This sets the compressor enabled state (already mapped in HISE)
compressor.ssetBypassed(0, value);// Now also toggle the gain module
gain.setBypassed(0.00, value);
}
? -
@pcs800 Or
gain.setBypassed("Gain", 0.00); ? -
@pcs800 please don‘t post AI code here - it poisons the code quality in the forum.
You can obviously use AI for yourself but typing something into ChatGPT and then paste in here here for DaveGPT to correct it is super lazy.
-
@Christoph-Hart
I'm just trying to learn without bothering everyone here too much -
@pcs800 said in Adding a second action to a button:
I'm just trying to learn without bothering everyone here too much
AI is not a good teacher. A good teacher will tell you when you made a mistake, but with AI you have to tell it when it made a mistake - but that makes you the teacher...
AI is great for improving your workflow once you're able to spot and correct its mistakes. It can also guide you down a path of investigation so that you have some idea of which part of the documentation you need to be reading.
-
@pcs800 said in Adding a second action to a button:
Doing the parameter dump, I see this.
This is only useful for
setAttribute
. As I say you don't need to use this function for this task and should usesetBypassed
instead. The documentation in the API browser should help you here, it just takes one parameter. -
HISE will remain outside of AI scope for some time because there's just not enough training data out there, and it's not entirely code-based.
However if you're adamant on using it, you NEED to feed the docs into the context.
RAG is not very good here.
Instead, I recommend you use the Context7 MCP, so you'll need to use an AI tool that lets you use MCP tools.
The IDE-based ones all do, but so does Claude Desktop (as Anthropic were the ones to come up with the protocol), which is much nicer to work with in this particular case because you can set up projects with custom instructions and knowledge. Get Claude Desktop, create a project, describe what you're doing, and in the project instructions explicitly mention you're working in HISE and that it should use Context7 to always get the docs because there's not enough training data. Update the project knowledge as you go along and as you learn which stuff makes the LLM trip up.
It would be better to use it to chat about HISE, sampling, VI paradigms and DSP using Context7 as a doc tool for HISE instead of letting it write your code, as a big part of the HISE dev workflow is not really code-based. So I'm not encouraging it, but if you're gonna do it anyway, no one can stop you, so I'm letting you know about the best way to do it that I've found, and actually getting something useful and concurrent out of it.
-
@d-healey
I've got it working now, thanks -
@pcs800 Nice!