Eyetracker |

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
pygaze._sound.pygamesound.PyGameSound Class Reference
Inheritance diagram for pygaze._sound.pygamesound.PyGameSound:

## Public Member Functions
| __init__ (self, osc=settings.SOUNDOSCILLATOR, freq=settings.SOUNDFREQUENCY, length=settings.SOUNDLENGTH, attack=settings.SOUNDATTACK, decay=settings.SOUNDDECAY, soundfile=None)
| saw (self, phase)
| square (self, phase)
| white_noise (self, phase)
| pan (self, panning)
| play (self, repeats=0)
| stop (self)
| set_volume (self, volume)
Public Member Functions inherited from pygaze._sound.basesound.BaseSound
| __init__ (self)

## Public Attributes
| sound = pygame.mixer.Sound(soundfile)

## Constructor & Destructor Documentation

## ◆ __init__()

pygaze._sound.pygamesound.PyGameSound.__init__ | ( |  | self,
|  |  | osc = settings.SOUNDOSCILLATOR,
|  |  | freq = settings.SOUNDFREQUENCY,
|  |  | length = settings.SOUNDLENGTH,
|  |  | attack = settings.SOUNDATTACK,
|  |  | decay = settings.SOUNDDECAY,
|  |  | soundfile = None )

## Member Function Documentation

## ◆ pan()

pygaze._sound.pygamesound.PyGameSound.pan | ( |  | self,
|  |  | panning )

            Sets the panning of a sound (the volume of the 'unpanned'
            channel decreases, while the other channel remaines the same)

            arguments

            panning --  either a float between -1 and 1, 'left' or 'right':
                        'left': full panning to left (same as -1)
                        < 0:    panning to left
                        0:      no panning
                        > 0:    panning to right
                        'right':    full panning to left (same as 1)

            keyword arguments

            None

            returns

            None        -- self.sound is panned

Reimplemented from pygaze._sound.basesound.BaseSound.

## ◆ play()

pygaze._sound.pygamesound.PyGameSound.play | ( |  | self,
|  |  | repeats = 0 )

            Plays specified sound (keyword argument loops specifies how many
            repeats after being played once, -1 is infinite); function does not
            wait for playback end, but returns immediately

            arguments

            None

            keyword arguments

            repeats --  specifies the amount of repeats after being played
                        once (-1 is infinite) (default = 0)

            returns

            None        --  self.sound is played

Reimplemented from pygaze._sound.basesound.BaseSound.

## ◆ saw()

pygaze._sound.pygamesound.PyGameSound.saw | ( |  | self,
|  |  | phase )

            Returns a point in a saw wave (for internal use)

            arguments

            phase       --  phase of the wave

            keyword arguments

            None

            returns

            p       --  point in a saw wave

## ◆ set_volume()

pygaze._sound.pygamesound.PyGameSound.set_volume | ( |  | self,
|  |  | volume )

            Set the playback volume (loudness) to specified value

            arguments

            volume  --  float between 0 and 1

            keyword arguments

            None

            returns

            None        --  sets self.sound volume to specified value

Reimplemented from pygaze._sound.basesound.BaseSound.

## ◆ square()

pygaze._sound.pygamesound.PyGameSound.square | ( |  | self,
|  |  | phase )

            Returns a point in a square wave (for internal use)

            arguments

            phase       --  phase of the wave

            keyword arguments

            None

            returns
            p       --  point in a square wave

## ◆ stop()

pygaze._sound.pygamesound.PyGameSound.stop | ( |  | self | ) |

            Stops sound playback

            arguments

            None

            keyword arguments

            None

            returns

            None        --  self.sound stops playing

Reimplemented from pygaze._sound.basesound.BaseSound.

## ◆ white_noise()

pygaze._sound.pygamesound.PyGameSound.white_noise | ( |  | self,
|  |  | phase )

            Returns a point in random noise (for internal use)

            arguments

            phase       --  phase of the sound (ignored, but necessary for
                        internal reasons; see __init__)

            keyword arguments

            None

            returns

            p       --  random number (i.e. a point in white noise sound)

## Member Data Documentation

## ◆ sound

pygaze._sound.pygamesound.PyGameSound.sound = pygame.mixer.Sound(soundfile)

The documentation for this class was generated from the following file:

- C:/Users/lurax/eyetrackingTobii/pygaze/_sound/pygamesound.py