SoundServiceクラス

クラスサービス(game:GetService("SoundService")で取り出す)Instance.newでは作れない日本語解説あり

ひとことで言うと

ゲーム全体の音の設定を管理するサービスです。

公式の説明(英語):A service that determines various aspects of how the audio engine works. Most of its properties affect how Class.Sound|Sounds play in the experience.

クラスの関係

受け継いでいるクラス:Object → Instance → SoundService

プロパティ(12)

名前と書き方説明
AcousticSimulationEnabled
SoundService.AcousticSimulationEnabled: boolean
Determines whether acoustic simulation is enabled globally in the advanced audio system.
AmbientReverb
SoundService.AmbientReverb: ReverbType
The ambient sound environment preset applied to all Class.Sound|Sounds.
CharacterSoundsUseNewApi
SoundService.CharacterSoundsUseNewApi: RolloutState
Determines whether the default character sounds will use instances in the advanced audio system vs. Class.Sound|Sounds.
DefaultListenerLocation
SoundService.DefaultListenerLocation: ListenerLocation
Determines where (if anywhere) to place an AudioListener by default.
DistanceFactor
SoundService.DistanceFactor: float
The number of studs to be considered a meter by SoundService when simulating the Doppler effect for Class.Sound|Sounds.
DopplerScale
SoundService.DopplerScale: float
Degree to which the pitch of a Sound varies due to the Doppler effect.
ListenerCFrame
SoundService.ListenerCFrame: CFrame
The CFrame that is used as the listener's position if Class.SoundService.ListenerType|ListenerType is set to ListenerType.CFrame.
ListenerObject
SoundService.ListenerObject: Instance
The Instance whose translation or coordinate frame is used as the listener's position if Class.SoundService.ListenerType|ListenerType is set to ListenerType.ObjectPosition or ListenerType.ObjectCFrame.
ListenerType
SoundService.ListenerType: ListenerType
The current listener type used by 3D Class.Sound|Sounds to determine where they will be heard from.
RespectFilteringEnabled
SoundService.RespectFilteringEnabled: boolean
Sets whether Sound playback from a client will replicate to the server.
RolloffScale
SoundService.RolloffScale: float
Determines how fast the volume of a Sound attenuates beyond its Sound.RollOffMinDistance.
VolumetricAudio
SoundService.VolumetricAudio: VolumetricAudio
Determines whether certain spatialized Class.Sound|Sounds emit volumetrically, throughout the space of their parent object.

メソッド(6)

名前と書き方説明
GetListener
SoundService:GetListener(): Tuple
Returns the current listener type used by Class.Sound|Sounds, as well as what that listener is currently set to.
GetMixerTime
SoundService:GetMixerTime(): double
Returns a number in seconds which increases as the audio engine mixes.
OpenAttenuationCurveEditor
SoundService:OpenAttenuationCurveEditor(selectedCurveObjects: Instances): ()
Opens the attenuation curve editor in Studio for the provided AudioEmitter or AudioListener instances.
OpenDirectionalCurveEditor
SoundService:OpenDirectionalCurveEditor(selectedCurveObjects: Instances): ()
Opens the directional curve editor in Studio for the provided AudioEmitter or AudioListener instances.
PlayLocalSound
SoundService:PlayLocalSound(sound: Instance): ()
Plays a copy of a Sound locally, such that it will only be heard by the client calling this method.
SetListener
SoundService:SetListener(listenerType: ListenerType, listener: Tuple): ()
Sets the listener used by Class.Sound|Sounds.

受け継いでいるメンバー

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(SoundService)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む