-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[@ 0.000] print: 0.148387 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#N canvas 670 156 450 300 12; | ||
#X obj 55 17 loadbang; | ||
#X obj 55 152 print; | ||
#X msg 116 77 3.1; | ||
#X msg 55 77 2.3; | ||
#X obj 55 42 t b b b; | ||
#X msg 178 77 5.5; | ||
#X obj 55 119 expr ($f1/$f2)/$i3; | ||
#X connect 0 0 4 0; | ||
#X connect 2 0 6 1; | ||
#X connect 3 0 6 0; | ||
#X connect 4 0 3 0; | ||
#X connect 4 1 2 0; | ||
#X connect 4 2 5 0; | ||
#X connect 5 0 6 2; | ||
#X connect 6 0 1 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[@ 0.000] print: 35.65 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#N canvas 670 156 450 300 12; | ||
#X obj 55 17 loadbang; | ||
#X obj 55 152 print; | ||
#X msg 109 77 3.1; | ||
#X msg 55 77 2.3; | ||
#X obj 55 119 expr $f1*$f2*$i3; | ||
#X obj 55 42 t b b b; | ||
#X msg 164 77 5.5; | ||
#X connect 0 0 5 0; | ||
#X connect 2 0 4 1; | ||
#X connect 3 0 4 0; | ||
#X connect 4 0 1 0; | ||
#X connect 5 0 3 0; | ||
#X connect 5 1 2 0; | ||
#X connect 5 2 6 0; | ||
#X connect 6 0 4 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright (C) 2014-2018 Enzien Audio, Ltd. | ||
# Copyright (C) 2022 Wasted Audio | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import argparse | ||
import os | ||
|
||
from tests.framework.base_control import TestPdControlBase | ||
|
||
|
||
class TestPdControlPatches(TestPdControlBase): | ||
SCRIPT_DIR = os.path.dirname(__file__) | ||
TEST_DIR = os.path.join(os.path.dirname(__file__), "pd", "control_expr") | ||
|
||
def test_mult(self): | ||
self._test_control_patch("test-mult.pd") | ||
|
||
def test_div(self): | ||
self._test_control_patch("test-div.pd") | ||
|
||
|
||
def main(): | ||
# TODO(mhroth): make this work | ||
parser = argparse.ArgumentParser( | ||
description="Compile a specific pd patch.") | ||
parser.add_argument( | ||
"pd_path", | ||
help="The path to the Pd file to read.") | ||
args = parser.parse_args() | ||
if os.path.exists(args.pd_path): | ||
result = TestPdControlPatches._test_control_patch(args.pd_path) | ||
print(result) | ||
else: | ||
print(f"Pd file path '{args.pd_path}' doesn't exist") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |