doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
reflect()
returns a vector reflected of a given normal. reflect(Vector2) -> Vector2 Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's. | pygame.ref.math#pygame.math.Vector2.reflect |
reflect_ip()
reflect the vector of a given normal in place. reflect_ip(Vector2) -> None Changes the direction of self as if it would have been reflected of a surface with the given surface normal. | pygame.ref.math#pygame.math.Vector2.reflect_ip |
rotate()
rotates a vector by a given angle in degrees. rotate(angle) -> Vector2 Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees. | pygame.ref.math#pygame.math.Vector2.rotate |
rotate_ip()
rotates the vector by a given angle in degrees in place. rotate_ip(angle) -> None Rotates the vector counterclockwise by the given angle in degrees. The length of the vector is not changed. | pygame.ref.math#pygame.math.Vector2.rotate_ip |
rotate_ip_rad()
rotates the vector by a given angle in radians in place. rotate_ip_rad(angle) -> None Rotates the vector counterclockwise by the given angle in radians. The length of the vector is not changed. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector2.rotate_ip_rad |
rotate_rad()
rotates a vector by a given angle in radians. rotate_rad(angle) -> Vector2 Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector2.rotate_rad |
scale_to_length()
scales the vector to a given length. scale_to_length(float) -> None Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length 0. If the vector is the zero vector (i.e. has length 0 thus no direction) a ValueError is raised. | pygame.ref.math#pygame.math.Vector2.scale_to_length |
slerp()
returns a spherical interpolation to the given vector. slerp(Vector2, float) -> Vector2 Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range [-1, 1]. It parametrizes where - in between the two vectors - the result should be. If a ne... | pygame.ref.math#pygame.math.Vector2.slerp |
update()
Sets the coordinates of the vector. update() -> None update(int) -> None update(float) -> None update(Vector2) -> None update(x, y) -> None update((x, y)) -> None Sets coordinates x and y in place. New in pygame 1.9.5. | pygame.ref.math#pygame.math.Vector2.update |
pygame.math.Vector3
a 3-Dimensional Vector Vector3() -> Vector3 Vector3(int) -> Vector3 Vector3(float) -> Vector3 Vector3(Vector3) -> Vector3 Vector3(x, y, z) -> Vector3 Vector3((x, y, z)) -> Vector3 Some general information about the Vector3 class. dot()
calculates the dot- or scalar-product with the other vect... | pygame.ref.math#pygame.math.Vector3 |
angle_to()
calculates the angle to a given vector in degrees. angle_to(Vector3) -> float Returns the angle between self and the given vector. | pygame.ref.math#pygame.math.Vector3.angle_to |
as_spherical()
returns a tuple with radial distance, inclination and azimuthal angle. as_spherical() -> (r, theta, phi) Returns a tuple (r, theta, phi) where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle. | pygame.ref.math#pygame.math.Vector3.as_spherical |
cross()
calculates the cross- or vector-product cross(Vector3) -> Vector3 calculates the cross-product. | pygame.ref.math#pygame.math.Vector3.cross |
distance_squared_to()
calculates the squared Euclidean distance to a given vector. distance_squared_to(Vector3) -> float | pygame.ref.math#pygame.math.Vector3.distance_squared_to |
distance_to()
calculates the Euclidean distance to a given vector. distance_to(Vector3) -> float | pygame.ref.math#pygame.math.Vector3.distance_to |
dot()
calculates the dot- or scalar-product with the other vector dot(Vector3) -> float | pygame.ref.math#pygame.math.Vector3.dot |
elementwise()
The next operation will be performed elementwise. elementwise() -> VectorElementwiseProxy Applies the following operation to each element of the vector. | pygame.ref.math#pygame.math.Vector3.elementwise |
from_spherical()
Sets x, y and z from a spherical coordinates 3-tuple. from_spherical((r, theta, phi)) -> None Sets x, y and z from a tuple (r, theta, phi) where r is the radial distance, theta is the inclination angle and phi is the azimuthal angle. | pygame.ref.math#pygame.math.Vector3.from_spherical |
is_normalized()
tests if the vector is normalized i.e. has length == 1. is_normalized() -> Bool Returns True if the vector has length equal to 1. Otherwise it returns False. | pygame.ref.math#pygame.math.Vector3.is_normalized |
length()
returns the Euclidean length of the vector. length() -> float calculates the Euclidean length of the vector which follows from the Pythagorean theorem: vec.length() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2) | pygame.ref.math#pygame.math.Vector3.length |
length_squared()
returns the squared Euclidean length of the vector. length_squared() -> float calculates the Euclidean length of the vector which follows from the Pythagorean theorem: vec.length_squared() == vec.x**2 + vec.y**2 + vec.z**2. This is faster than vec.length() because it avoids the square root. | pygame.ref.math#pygame.math.Vector3.length_squared |
lerp()
returns a linear interpolation to the given vector. lerp(Vector3, float) -> Vector3 Returns a Vector which is a linear interpolation between self and the given Vector. The second parameter determines how far between self an other the result is going to be. It must be a value between 0 and 1, where 0 means sel... | pygame.ref.math#pygame.math.Vector3.lerp |
magnitude()
returns the Euclidean magnitude of the vector. magnitude() -> float calculates the magnitude of the vector which follows from the theorem: vec.magnitude() == math.sqrt(vec.x**2 + vec.y**2 + vec.z**2) | pygame.ref.math#pygame.math.Vector3.magnitude |
magnitude_squared()
returns the squared Euclidean magnitude of the vector. magnitude_squared() -> float calculates the magnitude of the vector which follows from the theorem: vec.magnitude_squared() == vec.x**2 + vec.y**2 + vec.z**2. This is faster than vec.magnitude() because it avoids the square root. | pygame.ref.math#pygame.math.Vector3.magnitude_squared |
normalize()
returns a vector with the same direction but length 1. normalize() -> Vector3 Returns a new vector that has length equal to 1 and the same direction as self. | pygame.ref.math#pygame.math.Vector3.normalize |
normalize_ip()
normalizes the vector in place so that its length is 1. normalize_ip() -> None Normalizes the vector so that it has length equal to 1. The direction of the vector is not changed. | pygame.ref.math#pygame.math.Vector3.normalize_ip |
reflect()
returns a vector reflected of a given normal. reflect(Vector3) -> Vector3 Returns a new vector that points in the direction as if self would bounce of a surface characterized by the given surface normal. The length of the new vector is the same as self's. | pygame.ref.math#pygame.math.Vector3.reflect |
reflect_ip()
reflect the vector of a given normal in place. reflect_ip(Vector3) -> None Changes the direction of self as if it would have been reflected of a surface with the given surface normal. | pygame.ref.math#pygame.math.Vector3.reflect_ip |
rotate()
rotates a vector by a given angle in degrees. rotate(angle, Vector3) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in degrees around the given axis. | pygame.ref.math#pygame.math.Vector3.rotate |
rotate_ip()
rotates the vector by a given angle in degrees in place. rotate_ip(angle, Vector3) -> None Rotates the vector counterclockwise around the given axis by the given angle in degrees. The length of the vector is not changed. | pygame.ref.math#pygame.math.Vector3.rotate_ip |
rotate_ip_rad()
rotates the vector by a given angle in radians in place. rotate_ip_rad(angle, Vector3) -> None Rotates the vector counterclockwise around the given axis by the given angle in radians. The length of the vector is not changed. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_ip_rad |
rotate_rad()
rotates a vector by a given angle in radians. rotate_rad(angle, Vector3) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise by the given angle in radians around the given axis. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_rad |
rotate_x()
rotates a vector around the x-axis by the angle in degrees. rotate_x(angle) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in degrees. | pygame.ref.math#pygame.math.Vector3.rotate_x |
rotate_x_ip()
rotates the vector around the x-axis by the angle in degrees in place. rotate_x_ip(angle) -> None Rotates the vector counterclockwise around the x-axis by the given angle in degrees. The length of the vector is not changed. | pygame.ref.math#pygame.math.Vector3.rotate_x_ip |
rotate_x_ip_rad()
rotates the vector around the x-axis by the angle in radians in place. rotate_x_ip_rad(angle) -> None Rotates the vector counterclockwise around the x-axis by the given angle in radians. The length of the vector is not changed. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_x_ip_rad |
rotate_x_rad()
rotates a vector around the x-axis by the angle in radians. rotate_x_rad(angle) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise around the x-axis by the given angle in radians. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_x_rad |
rotate_y()
rotates a vector around the y-axis by the angle in degrees. rotate_y(angle) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in degrees. | pygame.ref.math#pygame.math.Vector3.rotate_y |
rotate_y_ip()
rotates the vector around the y-axis by the angle in degrees in place. rotate_y_ip(angle) -> None Rotates the vector counterclockwise around the y-axis by the given angle in degrees. The length of the vector is not changed. | pygame.ref.math#pygame.math.Vector3.rotate_y_ip |
rotate_y_ip_rad()
rotates the vector around the y-axis by the angle in radians in place. rotate_y_ip_rad(angle) -> None Rotates the vector counterclockwise around the y-axis by the given angle in radians. The length of the vector is not changed. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_y_ip_rad |
rotate_y_rad()
rotates a vector around the y-axis by the angle in radians. rotate_y_rad(angle) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise around the y-axis by the given angle in radians. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_y_rad |
rotate_z()
rotates a vector around the z-axis by the angle in degrees. rotate_z(angle) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in degrees. | pygame.ref.math#pygame.math.Vector3.rotate_z |
rotate_z_ip()
rotates the vector around the z-axis by the angle in degrees in place. rotate_z_ip(angle) -> None Rotates the vector counterclockwise around the z-axis by the given angle in degrees. The length of the vector is not changed. | pygame.ref.math#pygame.math.Vector3.rotate_z_ip |
rotate_z_ip_rad()
rotates the vector around the z-axis by the angle in radians in place. rotate_z_ip_rad(angle) -> None Rotates the vector counterclockwise around the z-axis by the given angle in radians. The length of the vector is not changed. | pygame.ref.math#pygame.math.Vector3.rotate_z_ip_rad |
rotate_z_rad()
rotates a vector around the z-axis by the angle in radians. rotate_z_rad(angle) -> Vector3 Returns a vector which has the same length as self but is rotated counterclockwise around the z-axis by the given angle in radians. New in pygame 2.0.0. | pygame.ref.math#pygame.math.Vector3.rotate_z_rad |
scale_to_length()
scales the vector to a given length. scale_to_length(float) -> None Scales the vector so that it has the given length. The direction of the vector is not changed. You can also scale to length 0. If the vector is the zero vector (i.e. has length 0 thus no direction) a ValueError is raised. | pygame.ref.math#pygame.math.Vector3.scale_to_length |
slerp()
returns a spherical interpolation to the given vector. slerp(Vector3, float) -> Vector3 Calculates the spherical interpolation from self to the given Vector. The second argument - often called t - must be in the range [-1, 1]. It parametrizes where - in between the two vectors - the result should be. If a ne... | pygame.ref.math#pygame.math.Vector3.slerp |
update()
Sets the coordinates of the vector. update() -> None update(int) -> None update(float) -> None update(Vector3) -> None update(x, y, z) -> None update((x, y, z)) -> None Sets coordinates x, y, and z in place. New in pygame 1.9.5. | pygame.ref.math#pygame.math.Vector3.update |
pygame.midi
pygame module for interacting with midi input and output. New in pygame 1.9.0. The midi module can send output to midi devices and get input from midi devices. It can also list midi devices on the system. The midi module supports real and virtual midi devices. It uses the portmidi library. Is portabl... | pygame.ref.midi |
pygame.midi.frequency_to_midi()
Converts a frequency into a MIDI note. Rounds to the closest midi note. frequency_to_midi(midi_note) -> midi_note example: frequency_to_midi(27.5) == 21 New in pygame 1.9.5. | pygame.ref.midi#pygame.midi.frequency_to_midi |
pygame.midi.get_count()
gets the number of devices. get_count() -> num_devices Device ids range from 0 to get_count() - 1 | pygame.ref.midi#pygame.midi.get_count |
pygame.midi.get_default_input_id()
gets default input device number get_default_input_id() -> default_id The following describes the usage details for this function and the get_default_output_id() function. Return the default device ID or -1 if there are no devices. The result can be passed to the Input/Output class... | pygame.ref.midi#pygame.midi.get_default_input_id |
pygame.midi.get_default_output_id()
gets default output device number get_default_output_id() -> default_id See get_default_input_id() for usage details. | pygame.ref.midi#pygame.midi.get_default_output_id |
pygame.midi.get_device_info()
returns information about a midi device get_device_info(an_id) -> (interf, name, input, output, opened) get_device_info(an_id) -> None Gets the device info for a given id.
Parameters:
an_id (int) -- id of the midi device being queried
Returns:
if the id is out of range None is r... | pygame.ref.midi#pygame.midi.get_device_info |
pygame.midi.get_init()
returns True if the midi module is currently initialized get_init() -> bool Gets the initialization state of the pygame.midi module.
Returns:
True if the pygame.midi module is currently initialized.
Return type:
bool New in pygame 1.9.5. | pygame.ref.midi#pygame.midi.get_init |
pygame.midi.init()
initialize the midi module init() -> None Initializes the pygame.midi module. Must be called before using the pygame.midi module. It is safe to call this more than once. | pygame.ref.midi#pygame.midi.init |
pygame.midi.Input
Input is used to get midi input from midi devices. Input(device_id) -> None Input(device_id, buffer_size) -> None
Parameters:
device_id (int) -- midi device id
buffer_size (int) -- (optional) the number of input events to be buffered close()
closes a midi stream, flushing any pend... | pygame.ref.midi#pygame.midi.Input |
close()
closes a midi stream, flushing any pending buffers. close() -> None PortMidi attempts to close open streams when the application exits. Note This is particularly difficult under Windows. | pygame.ref.midi#pygame.midi.Input.close |
poll()
returns True if there's data, or False if not. poll() -> bool Used to indicate if any data exists.
Returns:
True if there is data, False otherwise
Return type:
bool
Raises:
MidiException -- on error | pygame.ref.midi#pygame.midi.Input.poll |
read()
reads num_events midi events from the buffer. read(num_events) -> midi_event_list Reads from the input buffer and gives back midi events.
Parameters:
num_events (int) -- number of input events to read
Returns:
the format for midi_event_list is [[[status, data1, data2, data3], timestamp], ...]
Retur... | pygame.ref.midi#pygame.midi.Input.read |
pygame.midi.midi_to_ansi_note()
Returns the Ansi Note name for a midi number. midi_to_ansi_note(midi_note) -> ansi_note example: midi_to_ansi_note(21) == 'A0' New in pygame 1.9.5. | pygame.ref.midi#pygame.midi.midi_to_ansi_note |
pygame.midi.midi_to_frequency()
Converts a midi note to a frequency. midi_to_frequency(midi_note) -> frequency example: midi_to_frequency(21) == 27.5 New in pygame 1.9.5. | pygame.ref.midi#pygame.midi.midi_to_frequency |
exception pygame.midi.MidiException
exception that pygame.midi functions and classes can raise MidiException(errno) -> None | pygame.ref.midi#pygame.midi.MidiException |
pygame.midi.midis2events()
converts midi events to pygame events midis2events(midi_events, device_id) -> [Event, ...] Takes a sequence of midi events and returns list of pygame events. The midi_events data is expected to be a sequence of ((status, data1, data2, data3), timestamp) midi events (all values required). ... | pygame.ref.midi#pygame.midi.midis2events |
pygame.midi.Output
Output is used to send midi to an output device Output(device_id) -> None Output(device_id, latency=0) -> None Output(device_id, buffer_size=256) -> None Output(device_id, latency, buffer_size) -> None The buffer_size specifies the number of output events to be buffered waiting for output. In some... | pygame.ref.midi#pygame.midi.Output |
abort()
terminates outgoing messages immediately abort() -> None The caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time. | pygame.ref.midi#pygame.midi.Output.abort |
close()
closes a midi stream, flushing any pending buffers. close() -> None PortMidi attempts to close open streams when the application exits. Note This is particularly difficult under Windows. | pygame.ref.midi#pygame.midi.Output.close |
note_off()
turns a midi note off (note must be on) note_off(note, velocity=None, channel=0) -> None Turn a note off in the output stream. The note must already be on for this to work correctly. | pygame.ref.midi#pygame.midi.Output.note_off |
note_on()
turns a midi note on (note must be off) note_on(note, velocity=None, channel=0) -> None Turn a note on in the output stream. The note must already be off for this to work correctly. | pygame.ref.midi#pygame.midi.Output.note_on |
pitch_bend()
modify the pitch of a channel. set_instrument(value=0, channel=0) -> None Adjust the pitch of a channel. The value is a signed integer from -8192 to +8191. For example, 0 means "no change", +4096 is typically a semitone higher, and -8192 is 1 whole tone lower (though the musical range corresponding to t... | pygame.ref.midi#pygame.midi.Output.pitch_bend |
set_instrument()
select an instrument, with a value between 0 and 127 set_instrument(instrument_id, channel=0) -> None Select an instrument. | pygame.ref.midi#pygame.midi.Output.set_instrument |
write()
writes a list of midi data to the Output write(data) -> None Writes series of MIDI information in the form of a list.
Parameters:
data (list) -- data to write, the expected format is [[[status, data1=0, data2=0, ...], timestamp], ...] with the data# fields being optional
Raises:
IndexError -- if mor... | pygame.ref.midi#pygame.midi.Output.write |
write_short()
writes up to 3 bytes of midi data to the Output write_short(status) -> None write_short(status, data1=0, data2=0) -> None Output MIDI information of 3 bytes or less. The data fields are optional and assumed to be 0 if omitted. Examples of status byte values: 0xc0 # program change
0x90 # note on
# etc... | pygame.ref.midi#pygame.midi.Output.write_short |
write_sys_ex()
writes a timestamped system-exclusive midi message. write_sys_ex(when, msg) -> None Writes a timestamped system-exclusive midi message.
Parameters:
msg (list[int] or str) -- midi message
when -- timestamp in milliseconds Example: midi_output.write_sys_ex(0, '\xF0\x7D\x10\x11\x12\x13\xF7'... | pygame.ref.midi#pygame.midi.Output.write_sys_ex |
pygame.midi.quit()
uninitialize the midi module quit() -> None Uninitializes the pygame.midi module. If pygame.midi.init() was called to initialize the pygame.midi module, then this function will be called automatically when your program exits. It is safe to call this function more than once. | pygame.ref.midi#pygame.midi.quit |
pygame.midi.time()
returns the current time in ms of the PortMidi timer time() -> time The time is reset to 0 when the pygame.midi module is initialized. | pygame.ref.midi#pygame.midi.time |
pygame.mixer
pygame module for loading and playing sounds This module contains classes for loading Sound objects and controlling playback. The mixer module is optional and depends on SDL_mixer. Your program should test that pygame.mixer is available and initialized before using it. The mixer module has a limited n... | pygame.ref.mixer |
pygame.mixer.Channel
Create a Channel object for controlling playback Channel(id) -> Channel Return a Channel object for one of the current channels. The id must be a value from 0 to the value of pygame.mixer.get_num_channels(). The Channel object can be used to get fine control over the playback of Sounds. A channe... | pygame.ref.mixer#pygame.mixer.Channel |
fadeout()
stop playback after fading channel out fadeout(time) -> None Stop playback of a channel after fading out the sound over the given time argument in milliseconds. | pygame.ref.mixer#pygame.mixer.Channel.fadeout |
get_busy()
check if the channel is active get_busy() -> bool Returns True if the channel is actively mixing sound. If the channel is idle this returns False. | pygame.ref.mixer#pygame.mixer.Channel.get_busy |
get_endevent()
get the event a channel sends when playback stops get_endevent() -> type Returns the event type to be sent every time the Channel finishes playback of a Sound. If there is no endevent the function returns pygame.NOEVENT. | pygame.ref.mixer#pygame.mixer.Channel.get_endevent |
get_queue()
return any Sound that is queued get_queue() -> Sound If a Sound is already queued on this channel it will be returned. Once the queued sound begins playback it will no longer be on the queue. | pygame.ref.mixer#pygame.mixer.Channel.get_queue |
get_sound()
get the currently playing Sound get_sound() -> Sound Return the actual Sound object currently playing on this channel. If the channel is idle None is returned. | pygame.ref.mixer#pygame.mixer.Channel.get_sound |
get_volume()
get the volume of the playing channel get_volume() -> value Return the volume of the channel for the current playing sound. This does not take into account stereo separation used by Channel.set_volume(). The Sound object also has its own volume which is mixed with the channel. | pygame.ref.mixer#pygame.mixer.Channel.get_volume |
pause()
temporarily stop playback of a channel pause() -> None Temporarily stop the playback of sound on a channel. It can be resumed at a later time with Channel.unpause() | pygame.ref.mixer#pygame.mixer.Channel.pause |
play()
play a Sound on a specific Channel play(Sound, loops=0, maxtime=0, fade_ms=0) -> None This will begin playback of a Sound on a specific Channel. If the Channel is currently playing any other Sound it will be stopped. The loops argument has the same meaning as in Sound.play(): it is the number of times to repe... | pygame.ref.mixer#pygame.mixer.Channel.play |
queue()
queue a Sound object to follow the current queue(Sound) -> None When a Sound is queued on a Channel, it will begin playing immediately after the current Sound is finished. Each channel can only have a single Sound queued at a time. The queued Sound will only play if the current playback finished automaticall... | pygame.ref.mixer#pygame.mixer.Channel.queue |
set_endevent()
have the channel send an event when playback stops set_endevent() -> None set_endevent(type) -> None When an endevent is set for a channel, it will send an event to the pygame queue every time a sound finishes playing on that channel (not just the first time). Use pygame.event.get() to retrieve the en... | pygame.ref.mixer#pygame.mixer.Channel.set_endevent |
set_volume()
set the volume of a playing channel set_volume(value) -> None set_volume(left, right) -> None Set the volume (loudness) of a playing sound. When a channel starts to play its volume value is reset. This only affects the current sound. The value argument is between 0.0 and 1.0. If one argument is passed, ... | pygame.ref.mixer#pygame.mixer.Channel.set_volume |
stop()
stop playback on a Channel stop() -> None Stop sound playback on a channel. After playback is stopped the channel becomes available for new Sounds to play on it. | pygame.ref.mixer#pygame.mixer.Channel.stop |
unpause()
resume pause playback of a channel unpause() -> None Resume the playback on a paused channel. | pygame.ref.mixer#pygame.mixer.Channel.unpause |
pygame.mixer.fadeout()
fade out the volume on all sounds before stopping fadeout(time) -> None This will fade out the volume on all active channels over the time argument in milliseconds. After the sound is muted the playback will stop. | pygame.ref.mixer#pygame.mixer.fadeout |
pygame.mixer.find_channel()
find an unused channel find_channel(force=False) -> Channel This will find and return an inactive Channel object. If there are no inactive Channels this function will return None. If there are no inactive channels and the force argument is True, this will find the Channel with the longest... | pygame.ref.mixer#pygame.mixer.find_channel |
pygame.mixer.get_busy()
test if any sound is being mixed get_busy() -> bool Returns True if the mixer is busy mixing any channels. If the mixer is idle then this return False. | pygame.ref.mixer#pygame.mixer.get_busy |
pygame.mixer.get_init()
test if the mixer is initialized get_init() -> (frequency, format, channels) If the mixer is initialized, this returns the playback arguments it is using. If the mixer has not been initialized this returns None. | pygame.ref.mixer#pygame.mixer.get_init |
pygame.mixer.get_num_channels()
get the total number of playback channels get_num_channels() -> count Returns the number of currently active playback channels. | pygame.ref.mixer#pygame.mixer.get_num_channels |
pygame.mixer.get_sdl_mixer_version()
get the mixer's SDL version get_sdl_mixer_version() -> (major, minor, patch) get_sdl_mixer_version(linked=True) -> (major, minor, patch)
Parameters:
linked (bool) -- if True (default) the linked version number is returned, otherwise the compiled version number is returned ... | pygame.ref.mixer#pygame.mixer.get_sdl_mixer_version |
pygame.mixer.init()
initialize the mixer module init(frequency=44100, size=-16, channels=2, buffer=512, devicename=None, allowedchanges=AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) -> None Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide sp... | pygame.ref.mixer#pygame.mixer.init |
pygame.mixer.music
pygame module for controlling streamed audio The music module is closely tied to pygame.mixer. Use the music module to control the playback of music in the sound mixer. The difference between the music playback and regular Sound playback is that the music is streamed, and never actually loaded a... | pygame.ref.music |
pygame.mixer.music.fadeout()
stop music playback after fading out fadeout(time) -> None Fade out and stop the currently playing music. The time argument denotes the integer milliseconds for which the fading effect is generated. Note, that this function blocks until the music has faded out. Calls to fadeout() and set... | pygame.ref.music#pygame.mixer.music.fadeout |
pygame.mixer.music.get_busy()
check if the music stream is playing get_busy() -> bool Returns True when the music stream is actively playing. When the music is idle this returns False. In pygame 2.0.1 and above this function returns False when the music is paused. In pygame 1 it returns True when the music is paused... | pygame.ref.music#pygame.mixer.music.get_busy |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.