Skip to content

emacsorphanage/sound-wav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sound-wav.el melpa badge melpa stable badge

sound-wav.el provides play wav file. It is Emacs port of vim-sound

Requirements

Installation

sound-wav is available on MELPA and MELPA stable

You can install sound-wav with the following command.

M-x package-install [RET] sound-wav [RET]

To speed up sound playing in windows, make sure powershell is installed, and then install the emacs package powershell. This can be done with the following command:

M-x package-install [RET] poweshell [RET]

When this is installed, sound-wav will create a hidden shell process named * sound-wav-powershell* to play sounds without needing to start poweshell multiple times. For me this changes a 1-2 second delay in sounds to immediate sound processing.

Interface

(sound-wav-play wav-file1 wav-file2...)

Play wav-file1, wav-file2... . This function takes variable arguments.

Sample Code

;; Play wav file when file opened
(defun my/find-file-hook ()
  (sound-wav-play "somemusic.wav"))
(add-hook 'find-file-hook 'my/find-file-hook)

;; Play wav file when you start to write python
(eval-after-load "python"
  '(progn
     (sound-wav-play "somemusic.wav")))