I’m trying use SuperDirt directly in Supercollider, and I’ve seen that \degree and \scale don’t work with the \dirt event type – they seem to not be implemented. I guess that’s because they are taken care of on the Tidal side of the system, but, is there a workaround to be able to use them like I would with a \note event type?
I extended a class to manually set it, but it’s too hacky for my taste. What would be the right way to implement it?
You could make an EventType (\dirtDegrees maybe) that sets type to \dirt: from the help for Event:
// It is possible to reuse some of another event type's functionality:
(
Event.addEventType(\happyEvent, { |server|
~octave = [5, 6, 7]; // always play three octaves
~detune = 10.0.rand2; // always play a bit out of tune
~type = \note; // now set type to a different one
currentEnvironment.play;
});
Which means that \degree is already defined. According to the Event help file:
For the usage and meaning of the parent and proto events, see IdentityDictionary
which says:
Looking up a key within a dictionary first checks the dictionary itself. If the key is not found at this level, it looks in the proto , and if still not found, it looks in the parent.
To make sure, I polled \degree and it does indeed already exist.