Skip to main content

pywinmm:

this python library can help you to control your audio files where it support a lot of file formats.
video files will be supported through updates
this library is using the winmulty media dll (winmm.dll) that comes with windows.
am trying to make it simple as i can
so please support with ideas or you can help on github project
https://github.com/baaziznasser/pywinmm

install pywinmm

you can install pywinmm through the pypi by using
pip install pywinmm

what's new

  • aded PlaySound function, that can use to play a wav files, play wav from resources, and play regestered wav on system
  • aded MessageBeep function, this function can make a beep using the system regestered wavs
  • added Beep function, this function will generate a beep using the frequency and the time that you want

avalable functions

here is the list of avalable functions\

  • load (load the file)
  • loop (set or disable loop, the play function must recall after this function)
  • reverce (enable or disable reverce, the play function must call after this one)
  • loadrec (load the audio recorder)
  • play (play the audio)
  • record (start recording)
  • pause (pause the player or recorder)
  • resume (resume the player or the recorder)
  • getlength (get the length of file or the recorded time)
  • get position (get the current position)
  • setposition (change the current position)
  • get volume (get the current volume)
  • setvolume (get the current volume)
  • status (get the current status)
  • stop (stop the player or the recorder)
  • unload (unload the player or the recorder)
  • PlaySound (play a wav from file or resource)
  • MessageBeep (play a beep using system regestered wavs)
  • Beep (play a beep using a frequency and time by MS)

an other functions will be aded soon.

example of usage:

import pywinmm
import time
clip = pywinmm.load(r'snd.mp3')
print(clip.getvolume())
clip.setvolume(200)
print(clip.getvolume())
clip.loop(True)
clip.reverse(False)
clip.play()
print(clip.getlength())
time.sleep(1)
print(clip.getposition())
clip.setposition(2000)
print(clip.getposition())
clip.play()
print(clip.status())

notes:

this library can works only with windows

Metadata

Release files for pywinmm 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywinmm 0.3
File Size Uploaded
pywinmm-0.3.tar.gz 16.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pywinmm 0.3
File Interpreter ABI Platform
pywinmm-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 33.3 kB

Release files / pywinmm-0.3.tar.gz

Download URL pywinmm-0.3.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
16a0920c93ddb1dd1d90899fcd11bc20aa1b9d12b34a04a0d653f0bc8c2db73f
BLAKE2b-256 checksum
How to use checksums
723d24aac6d85355a7531fb956edb1baeb6972b70da6db54cb5e45ceee712a92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / pywinmm-0.3-py3-none-any.whl

Download URL pywinmm-0.3-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b11ca39eeaff5c17c10a4a44617c22fb2afdb0f9c0969883b18f7417f504ffd
BLAKE2b-256 checksum
How to use checksums
0c858af1687ebf67f3abadc7f38a071bd98bd5c07ed4ef4a057b8d1395c7e022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page