-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to load a wavetable onto a patch in python (#7765)
Addresses #7763
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 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,19 @@ | ||
""" | ||
Tests for Surge XT Python bindings. | ||
""" | ||
import sys | ||
sys.path.append('/Users/paul/dev/music/surge/cmake-build-debug/src/surge-python/') | ||
import surgepy | ||
|
||
def main(): | ||
s = surgepy.createSurge(44100) | ||
|
||
patch = s.getPatch() | ||
osc0 = patch["scene"][0]["osc"][0] | ||
otype = osc0["type"] | ||
s.setParamVal(otype, surgepy.constants.ot_wavetable) | ||
s.loadWavetable(0, 0, "/Users/paul/dev/music/surge/resources/data/wavetables_3rdparty/A.Liv/Droplet/Droplet 2.wav") | ||
s.savePatch("/Users/paul/Desktop/PythonGenerated.fxp") | ||
|
||
if __name__ == "__main__": | ||
main() |