Skip to main content

a python library that works with win multy media dll

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywinmm-0.3.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

pywinmm-0.3-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file pywinmm-0.3.tar.gz.

File metadata

  • Download URL: pywinmm-0.3.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pywinmm-0.3.tar.gz
Algorithm Hash digest
SHA256 16a0920c93ddb1dd1d90899fcd11bc20aa1b9d12b34a04a0d653f0bc8c2db73f
MD5 51663b91b464724cb6df2da58571aee8
BLAKE2b-256 723d24aac6d85355a7531fb956edb1baeb6972b70da6db54cb5e45ceee712a92

See more details on using hashes here.

File details

Details for the file pywinmm-0.3-py3-none-any.whl.

File metadata

  • Download URL: pywinmm-0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pywinmm-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b11ca39eeaff5c17c10a4a44617c22fb2afdb0f9c0969883b18f7417f504ffd
MD5 a949789d3eaa0f8b5e114bf3c0652b80
BLAKE2b-256 0c858af1687ebf67f3abadc7f38a071bd98bd5c07ed4ef4a057b8d1395c7e022

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page