Ejemplo n.º 1
0
# Using the patch selector menu, find and press the 'open factory patches' folder

import sxttest

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

ps = sxttest.firstChildByTitle(mf, "Patch Selector")
ps.ShowMenu()

patchMenu = sxttest.findAllMenus(sxt)[0]
sxttest.recursiveDump(patchMenu, "MENU:--")

temp = sxttest.firstChildByTitle(patchMenu, "Open Factory Patches Folder...")
temp.Press()
Ejemplo n.º 2
0
# The simplest use of the accessibility API. Grab a surge xt running instance
# and dump the accesibility heirarchy

import atomacos
import sxttest

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

ot = sxttest.firstChildByTitle(mf, "Scene A Play Mode")
ot.ShowMenu()
oscMenu = sxttest.findAllMenus(sxt)[0]

sxttest.recursiveDump(oscMenu, "OM>")
Ejemplo n.º 3
0
import sxttest
import time
import random

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()
time.sleep(1)

sxttest.loadPatchByPath(sxt, ["Templates", "Init Sine"])
# sxttest.loadPatchByPath(sxt, ["Test Cases", "StepAcc"])
time.sleep(0.2)

mods = sxttest.firstChildByTitle(mf, "Modulators")
l1 = sxttest.firstChildByTitle(mods, "LFO 1")
select = sxttest.firstChildByTitle(l1, "Select")
select.Press()

lct = sxttest.firstChildByTitle(mf, "LFO Controls")
sxttest.recursiveDump(lct, "LFO>")

tad = sxttest.firstChildByTitle(lct, "LFO Type And Display")
stp = sxttest.firstChildByTitle(tad, "Step Sequencer")

stp.Press()
time.sleep(0.1)
print(tad.AXValue)
time.sleep(0.5)

sxttest.recursiveDump(tad, "TAD>")
Ejemplo n.º 4
0
# Load init sine and then set up a couple of effects using the menus
# and so on

import sxttest
import time

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

sxttest.loadPatchByPath(sxt, ["Templates", "Init Sine"])
time.sleep(0.2)

fxr = sxttest.firstChildByTitle(mf, "FX Controls")
sxttest.recursiveDump(fxr, "FX>> ")

slt = sxttest.firstChildByTitle(fxr, "FX Slots")
print("SLOT VALUE : ", slt.AXValue)
sxttest.recursiveDump(slt, "SLOT>")

f1 = sxttest.firstChildByTitle(slt, "Send FX 1")
f1.Press()
print("SLOT VALUE : ", slt.AXValue)
time.sleep(0.2)

fxtype = sxttest.firstChildByTitle(fxr, "FX Type")
fxtype.ShowMenu()
path = ["Chorus", "Fat"]
for p in path:
    patchMenu = sxttest.findAllMenus(sxt)[0]
    temp = sxttest.firstChildByTitle(patchMenu, p)
Ejemplo n.º 5
0
import sxttest
import time
import math

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

sxttest.loadPatchByPath(sxt, ["Templates", "Init Sine"])
time.sleep(0.2)

scns = sxttest.firstChildByTitle(mf, "Active Scene")
sca = sxttest.firstChildByTitle(scns, "Scene A")
sca.Press()

osc = sxttest.firstChildByTitle(mf, "Oscillator Controls")
time.sleep(0.1)

ot = sxttest.firstChildByTitle(osc, "Oscillator Type")
ot.ShowMenu()
oscMenu = sxttest.findAllMenus(sxt)[0]
wt = sxttest.firstChildByTitle(oscMenu, "Wavetable")
wt.Press()
time.sleep(0.1)

# it is a bummer that the rebuild requires us to do this
mf = sxttest.getMainFrame(sxt)
osc = sxttest.firstChildByTitle(mf, "Oscillator Controls")
sxttest.recursiveDump(osc, "OSC Post>")
wtm = sxttest.firstChildByTitle(osc, "WT Menu")
wtm.Press()
Ejemplo n.º 6
0
# The simplest use of the accessibility API. Grab a surge xt running instance
# and dump the accesibility heirarchy

import atomacos
import sxttest

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

tad = sxttest.firstChildByTitle(mf, "Main Menu")
tad.Press()

main = sxttest.findAllMenus(sxt)[0]
temp = sxttest.firstChildByTitle(main, "About Surge")
temp.Press()

sxttest.recursiveDump(mf, "")

sgh = sxttest.firstChildByTitle(mf, "Surge GitHub")
sgh.Press()
Ejemplo n.º 7
0
import sxttest
import time
import math

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

sxttest.loadPatchByPath(sxt, ["Templates", "Init Sine"])
time.sleep(0.2)

scns = sxttest.firstChildByTitle(mf, "Active Scene")
sca = sxttest.firstChildByTitle(scns, "Scene A")
sca.Press()

osc = sxttest.firstChildByTitle(mf, "Oscillator Controls")
on = sxttest.firstChildByTitle(osc, "Oscillator Number")
o1 = sxttest.firstChildByTitle(on, "Osc 1")
o1.Press()
time.sleep(0.1)

for i in range(4):
    o3 = sxttest.firstChildByTitle(on, "Osc 3")
    o3.Press()
    time.sleep(0.1)
    o1 = sxttest.firstChildByTitle(on, "Osc 1")
    o1.Press()
    time.sleep(0.1)

# it is a bummer that the rebuild requires us to do this
mf = sxttest.getMainFrame(sxt)
Ejemplo n.º 8
0
# Show that that the modulation menu properly exposes to accessibility
# by dumping the menu, muting it, then dumping it again and unmuting it

import sxttest
import time

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

# Load DXEP
sxttest.loadPatchByPath(sxt, ["Keys", "DX EP"])
time.sleep(0.5)

pfg = sxttest.firstChildByTitle(mf, "Scene A Pre-Filter Gain")
pfg.ShowMenu()
pfgMenu = sxttest.findAllMenus(sxt)[0]
sxttest.recursiveDump(pfgMenu, "MENU>> ")
moded = sxttest.firstChildByTitle(pfgMenu, "Mute ENV 3")
moded.Press()

time.sleep(0.5)

pfg.ShowMenu()
pfgMenu = sxttest.findAllMenus(sxt)[0]
sxttest.recursiveDump(pfgMenu, "MENU>> ")
moded = sxttest.firstChildByTitle(pfgMenu, "UnMute ENV 3")
moded.Press()
Ejemplo n.º 9
0
# Load patches by a path. The function that is explicitly tested here
# is also available in sxttest as a helper function

import sxttest
import time

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

patches = [["Leads", "Sharpish"], ["Sequences", "Gate Chord"],
           ["Keys", "DX EP"], ["Plucks", "Bell 1"]]
ps = sxttest.firstChildByTitle(mf, "Patch Selector")

for patchPair in patches:
    print("LOADING ----", patchPair)
    ps.ShowMenu()
    patchMenu = sxttest.findAllMenus(sxt)[0]

    temp = sxttest.firstChildByTitle(patchMenu, patchPair[0])
    temp.Press()

    subMen = sxttest.findAllMenus(sxt)[0]
    loadPatch = sxttest.firstChildByTitle(subMen, patchPair[1])
    loadPatch.Press()
    time.sleep(0.5)
Ejemplo n.º 10
0
# Demonstrates creating modulations and so forth

import sxttest
import time

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

sxttest.loadPatchByPath(sxt, ["Templates", "Init Sine"])
time.sleep(1)

mods = sxttest.firstChildByTitle(mf, "Modulators")

sxttest.recursiveDump(mods, "MOD>")
l1 = sxttest.firstChildByTitle(mods, "LFO 1")
select = sxttest.firstChildByTitle(l1, "Select")
select.Press()
time.sleep(1)

l1 = sxttest.firstChildByTitle(mods, "Keytrack")
select = sxttest.firstChildByTitle(l1, "Select")
select.Press()
time.sleep(1)

od = sxttest.firstChildByTitle(mf, "Scene A Osc Drift")
od.AXValue = "32"
time.sleep(0.5)

co = sxttest.firstChildByTitle(mf, "Scene A Filter 1 Cutoff")
co.AXValue = "440"
Ejemplo n.º 11
0
import sxttest
import time

sxt = sxttest.getSXT()
mf = sxttest.getMainFrame(sxt)
mf.activate()

sxttest.loadPatchByPath(sxt, ["Templates", "Init Sine"])
time.sleep(0.2)

lct = sxttest.firstChildByTitle(mf, "LFO Controls")
sxttest.recursiveDump(lct, "LFO>")

tad = sxttest.firstChildByTitle(lct, "LFO Type And Display")
tri = sxttest.firstChildByTitle(tad, "Triangle")
noise = sxttest.firstChildByTitle(tad, "Noise")
mseg = sxttest.firstChildByTitle(tad, "MSEG")

tri.Press()
time.sleep(0.1)
print(tad.AXValue)
time.sleep(0.5)

noise.Press()
time.sleep(0.1)
print(tad.AXValue)
time.sleep(0.5)

mseg.Press()
time.sleep(0.1)
print(tad.AXValue)