Making SC write code on its own through GUI/Hotkeys

Recently, i’ve been wondering how one would create something like this

It doesn’t have to be as complicated as the example, i just want to do something like have an extension that creates a synthdef when i press a certain hotkey or something in that nature.

Fyi, what your looking for is called ‘snippets’. Scide doesn’t have them. However, it is possible to make changes to the current document with the Document class.

Here’s a quark that might work???

If you want a more feature complete ide you can use many others with supercollider, although I only know that neovim has decent support. It might take many years to learn vim though…

Also, did you try that guys code? He has a GitHub link in the video comment?

I will definitely check this out!coding, i wasn’t really sure how to make it work. That quark and the document class seem to be pretty much exactly what i am looking for, though. Thank you for your help!

If you want to get deep into the weeds, with SCNvim + NeoVim + LuaSnip you can do this kind of thing like crazy… Quite a project to configure though, not for the faint at heart!

Just using Document would look something like this:

Document.globalKeyDownAction_
{
	|...args| // document character modifier unicode keycode
	
	var doc, char, mod, uni, key; #doc, char, mod, uni, key = args
	;
	thisFunction.def.varNames.collect{ |x n| x -> args[n] }.printAll
	;
	case
	{
		mod.isShift
	}{
		//
	}{
		mod.isCtrl
	}{
		//
	}{
		mod.isAlt
	}{
		doc.string_
		(
			doc.string ++
			(
				Char.nl ++ // prepend with newline 
				(
					char.switch
					{
						$z
					}{
						"/\\/"
					}{
						$x
					}{
						"\\/\\"
					}
					
					{
						"" // default
					}	
				)
			)
		)
	}
	
	{
		// default action
	}
}