public void UpdateClips() { clips = new List <PureDataClip>(); foreach (PureDataInfo info in pureData.infoManager.GetAllClipInfos()) { PureDataClip clip = new PureDataClip(info, pureData); clips.Add(clip); } }
public PureDataClip GetClip(string soundName) { PureDataClip clip = null; try { clip = nameClipDict[soundName]; } catch { Logger.LogError(string.Format("Clip named {0} was not found.", soundName)); } return(clip); }
public void SetClip(PureDataClip clip) { Clip = clip; Load(); SwitchOff(); SetSourceSwitch(true); Info = new PureDataInfo(pureData.infoManager.GetInfo(clip.Name), pureData); State = PureDataStates.Waiting; SetPaused(false); SetOutput(Info.output); SetVolume(Info.volume + Info.volume * HelperFunctions.RandomRange(-Info.randomVolume, Info.randomVolume)); SetPitch(Info.pitch + Info.pitch * HelperFunctions.RandomRange(-Info.randomPitch, Info.randomPitch)); SetPlayRange(Info.playRangeStart, Info.playRangeEnd); SetFadeIn(Info.fadeIn); SetFadeOut(Info.fadeOut); SetLoop(Info.loop); }
public void Deactivate(PureDataClip clip) { nameOccurenceDict[clip.Name] -= 1; }