-- ************************************************** -- Provide Moho with the name of this script object -- ************************************************** ScriptName = "Syn_NoSpatial" -- ************************************************** -- General information about this script -- ************************************************** Syn_NoSpatial = {} function Syn_NoSpatial:Name() return "No Spatial" end function Syn_NoSpatial:Version() return "0.1" end function Syn_NoSpatial:Description() return "Automatically disable spatial positioning for audio layers" end function Syn_NoSpatial:Creator() return "(c)2021 J.Wesley Fowler (SynthSin75)" end function Syn_NoSpatial:UILabel() return "SYN: No Spatial" end -- ************************************************** -- The guts of this script -- ************************************************** function Syn_NoSpatial:IsRelevant(moho) if (moho.layer:LayerType() == MOHO.LT_AUDIO) and (self.layerCount and self.layerCount ~= moho:CountAudioLayers()) then moho:LayerAsAudio(moho.layer):SetSpatialPositioning(false) end self.layerCount = moho:CountAudioLayers() return false end