Skip to content

Commit f799483

Browse files
committed
Removed play_chord, play_error_sound and play_finish_sound functions. As a consequence sox has become a redundant dependency, thus it has been removed.
1 parent 1e2a390 commit f799483

File tree

11 files changed

+8
-88
lines changed

11 files changed

+8
-88
lines changed

.github/manimdependency.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"windows": {
3-
"sox": "sox-14.4.2-win32",
43
"ffmpeg": "https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-4.3.1-2020-09-16-full_build.zip"
54
}
65
}

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: Install system dependencies (MacOS)
5757
if: runner.os == 'macOS'
5858
run: |
59-
brew install openssl readline ffmpeg sox pyenv pyenv-virtualenv
59+
brew install openssl readline ffmpeg pyenv pyenv-virtualenv
6060
brew cask install basictex
6161
eval "$(/usr/libexec/path_helper -s)"
6262
sudo tlmgr update --self
@@ -70,13 +70,11 @@ jobs:
7070
uses: actions/cache@v2
7171
with:
7272
path: ${{ github.workspace }}\ManimCache
73-
key: ${{ runner.os }}-dependencies-ffmpeg-sox-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.pip-cache-and-time.outputs.date }}
73+
key: ${{ runner.os }}-dependencies-ffmpeg-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.pip-cache-and-time.outputs.date }}
7474

7575
- name: Download system dependencies (Windows)
7676
if: runner.os == 'Windows' && steps.cache-windows.outputs.cache-hit != 'true'
7777
run: |
78-
$soxVersion = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['sox'])"
79-
$soxVersionNumber = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['sox'].split('-')[1])"
8078
$ffmpegUrl = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['ffmpeg'])"
8179
$OriPath = $env:PATH
8280
echo "Install Tinytex"
@@ -86,10 +84,7 @@ jobs:
8684
tlmgr update --self
8785
tlmgr install standalone preview doublestroke ms setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english
8886
$env:PATH=$OriPath
89-
echo "Completed Latex Install Sox"
90-
Invoke-WebRequest "https://downloads.sourceforge.net/project/sox/sox/$($soxVersionNumber)/$($soxVersion).zip" -UserAgent "wget" -O "$($env:TMP)\SoX.zip"
91-
7z x "$($env:TMP)\SoX.zip" -o"$($PWD)\ManimCache"
92-
Move-Item "ManimCache\sox-*" "ManimCache\SoX"
87+
echo "Completed Latex"
9388
Invoke-WebRequest "$ffmpegUrl" -O "$($env:TMP)\ffmpeg.zip"
9489
7z x "$($env:TMP)\ffmpeg.zip" -o"$($PWD)\ManimCache"
9590
Move-Item "ManimCache\ffmpeg-*" "ManimCache\FFmpeg"
@@ -99,7 +94,6 @@ jobs:
9994
run: |
10095
$env:Path += ";" + "$($PWD)\ManimCache\FFmpeg\bin"
10196
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32"
102-
$env:Path += ";" + "$($PWD)\ManimCache\SoX"
10397
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
10498
echo "::set-env name=Path::$env:Path"
10599

docs/source/installation/linux.rst

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ instructions in `Certifying a clean install`_.
99

1010
The two necessary dependencies are cairo and ffmpeg. LaTeX is strongly
1111
recommended, as it is necessary to have access to the ``Tex`` and ``MathTex`` classes.
12-
Sox is only required if you want manim to play sounds when rendering scenes.
1312

1413
Ubuntu/Debian
1514
*************
@@ -40,12 +39,6 @@ To install LaTeX:
4039
sudo apt install texlive texlive-latex-extra texlive-fonts-extra \
4140
texlive-latex-recommended texlive-science texlive-fonts-extra tipa
4241
43-
To install Sox (optional):
44-
45-
.. code-block:: bash
46-
47-
sudo apt install sox
48-
4942
.. note:: These instructions are also valid for other Debian-based
5043
distributions or distributions that use the ``apt`` package manager.
5144

@@ -72,11 +65,6 @@ To install LaTeX:
7265
7366
sudo pacman -S texlive-most
7467
75-
To install Sox (optional):
76-
77-
.. code-block:: bash
78-
79-
sudo pacman -S sox
8068
8169
.. note:: These instructions are also valid for other Arch-based
8270
distributions or distributions that use the ``pacman`` package
@@ -89,8 +77,7 @@ Certifying a clean install
8977
To check that all dependencies have been installed properly, you can execute
9078
the commands ``ffmpeg -version`` and ``latex``. (If LaTeX is installed
9179
properly, you will be taken to a command-line program that captures your
92-
cursor. Press CTRL+C to exit.) To check that Sox is installed correctly,
93-
simply run ``sox``.
80+
cursor. Press CTRL+C to exit.)
9481

9582
.. note:: Note the LaTeX installation may take up a lot of space. The manim
9683
community developers are currently working on providing a simpler,

docs/source/installation/mac.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ To install ffmpeg:
2121
2222
brew install ffmpeg
2323
24-
To install Sox (optional):
25-
26-
.. code-block:: bash
27-
28-
brew install sox
29-
3024
To install LaTeX:
3125

3226
.. code-block:: bash
@@ -64,7 +58,7 @@ To check that all dependencies have been installed properly, you can execute
6458
the commands ``ffmpeg -version`` and ``latex`` (regardless of whether you
6559
installed MacTeX or BasicTeX). If LaTeX is installed properly, you will be
6660
taken to a command-line program that captures your cursor. Press CTRL+C to
67-
exit. To check that Sox is installed correctly, simply run ``sox``.
61+
exit.
6862

6963
After making sure you have a clean install, you can go back to
7064
:ref:`installing-manim`.

docs/source/installation/win.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ FFmpeg installation
2828
environment variable and running ``ffmpeg``.
2929

3030

31-
Sox installation (optional)
32-
***************************
33-
34-
1. To install Sox, execute ``choco install sox.portable``.
35-
36-
2. You can check if you did it right by running ``refreshenv`` to update your
37-
environment variable and running ``sox``.
38-
3931
.. _latex-installation:
4032

4133
LaTeX Installation

docs/source/tutorials/configuration.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The output looks as follows.
4646
.. testoutput::
4747
:options: -ELLIPSIS, +NORMALIZE_WHITESPACE
4848

49-
usage: manim [-h] [-o OUTPUT_FILE] [-p] [-f] [--sound] [--leave_progress_bars]
49+
usage: manim [-h] [-o OUTPUT_FILE] [-p] [-f] [--leave_progress_bars]
5050
[-a] [-w] [-s] [-g] [-i] [--disable_caching] [--flush_cache]
5151
[--log_to_file] [-c BACKGROUND_COLOR]
5252
[--background_opacity BACKGROUND_OPACITY] [--media_dir MEDIA_DIR]
@@ -72,7 +72,6 @@ The output looks as follows.
7272
-p, --preview Automatically open the saved file once its done
7373
-f, --show_in_file_browser
7474
Show the output file in the File Browser
75-
--sound Play a success/failure sound
7675
--leave_progress_bars
7776
Leave progress bars displayed in terminal
7877
-a, --write_all Write all the scenes from a file

manim/__main__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
get_scenes_to_render,
1818
)
1919
from .scene.scene import Scene
20-
from .utils.sounds import play_error_sound, play_finish_sound
2120
from .utils.file_ops import open_file as open_media_file
2221
from .grpc.impl import frame_server_impl
2322

@@ -73,7 +72,6 @@ def main():
7372
module = get_module(file_writer_config["input_file"])
7473
all_scene_classes = get_scene_classes_from_module(module)
7574
scene_classes_to_render = get_scenes_to_render(all_scene_classes)
76-
sound_on = file_writer_config["sound"]
7775
for SceneClass in scene_classes_to_render:
7876
try:
7977
if camera_config["use_js_renderer"]:
@@ -82,15 +80,10 @@ def main():
8280
scene = SceneClass()
8381
scene.render()
8482
open_file_if_needed(scene.file_writer)
85-
if sound_on:
86-
play_finish_sound()
8783
except Exception:
8884
print("\n\n")
8985
traceback.print_exc()
9086
print("\n\n")
91-
if not camera_config["use_js_renderer"]:
92-
if sound_on:
93-
play_error_sound()
9487

9588

9689
if __name__ == "__main__":

manim/config/config_utils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def _parse_file_writer_config(config_parser, args):
5252
for boolean_opt in [
5353
"preview",
5454
"show_in_file_browser",
55-
"sound",
5655
"leave_progress_bars",
5756
"write_to_movie",
5857
"save_last_frame",
@@ -236,12 +235,6 @@ def _parse_cli(arg_list, input=True):
236235
const=True,
237236
help="Show the output file in the File Browser",
238237
)
239-
parser.add_argument(
240-
"--sound",
241-
action="store_const",
242-
const=True,
243-
help="Play a success/failure sound",
244-
)
245238
parser.add_argument(
246239
"--leave_progress_bars",
247240
action="store_const",

manim/config/default.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ verbosity = INFO
4242
# --progress_bar
4343
progress_bar = True
4444

45-
# --sound
46-
sound = False
47-
4845
# -o, --output_file
4946
output_file =
5047

manim/scene/scene_file_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class SceneFileWriter(object):
2626
"""
2727
SceneFileWriter is the object that actually writes the animations
28-
played, into video files, using FFMPEG, and Sox, if sound is needed.
28+
played, into video files, using FFMPEG.
2929
This is mostly for Manim's internal use. You will rarely, if ever,
3030
have to use the methods for this class, unless tinkering with the very
3131
fabric of Manim's reality.

0 commit comments

Comments
 (0)