diff options
Diffstat (limited to 'attic/muse2-oom/muse2/share/pybridge/examples')
9 files changed, 0 insertions, 254 deletions
diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/addpartexample.py b/attic/muse2-oom/muse2/share/pybridge/examples/addpartexample.py deleted file mode 100644 index 65c41bdf..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/addpartexample.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') - -# -# Example on how to insert a new note, outcommented since I run the script several times and it inserts so many notes :-) -# But it works! -# - - -rpos = muse.getRPos() -lpos = muse.getLPos() - -event = {'data':[61,100,0], - 'tick':0, # Relative offset of part - 0 = beginning of part - 'type':"note", - 'len':rpos - lpos} - -part = {'events': [event], - 'tick': lpos} -muse.createPart("Track 1", lpos, rpos - lpos, part) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/addtrack.py b/attic/muse2-oom/muse2/share/pybridge/examples/addtrack.py deleted file mode 100644 index 116b35c0..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/addtrack.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -import time - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') - -for j in range(0,5): - for i in range(0,30): - muse.addMidiTrack("amiditrack" + str(i)) - for i in range(0,30): - muse.deleteTrack("amiditrack" + str(i)) - -for i in range(0, 10): - print i - muse.addMidiTrack("amiditrack") - muse.addWaveTrack("awavetrack") - muse.addOutput("anoutput") - muse.addInput("aninput") - muse.setMute("aninput", False) - muse.setAudioTrackVolume("aninput",1.0) - muse.deleteTrack("amiditrack") - muse.deleteTrack("awavetrack") - muse.deleteTrack("anoutput") - muse.deleteTrack("aninput") - time.sleep(1) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/ctrlexample.py b/attic/muse2-oom/muse2/share/pybridge/examples/ctrlexample.py deleted file mode 100644 index 9e28afad..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/ctrlexample.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -import time - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') -#for i in range(0,10): -# print "Ctrl no " + str(i) + " = " + str(muse.getMidiControllerValue("Track 1", i)) - -""" -for i in range(0,127): - muse.setMidiControllerValue("Track 1", 7, i) - time.sleep(0.1) -""" - -muse.setMidiControllerValue("Track 1", 7, 56) -print muse.getMidiControllerValue("Track 1", 7) -print muse.getAudioTrackVolume("Out 1") -muse.setAudioTrackVolume("Out 1", -1.0) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/effecttoggle.py b/attic/muse2-oom/muse2/share/pybridge/examples/effecttoggle.py deleted file mode 100644 index 6feb4bca..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/effecttoggle.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -import time - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') -trackname = "wavtrack" - -fxs = muse.getTrackEffects(trackname) -print fxs - -for i in range (0,10): - muse.toggleTrackEffect(trackname,0, False) - time.sleep(1) - muse.toggleTrackEffect(trackname,0, True) - time.sleep(1) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/mute.py b/attic/muse2-oom/muse2/share/pybridge/examples/mute.py deleted file mode 100644 index 5732a7f8..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/mute.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -import time - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') -for i in range(0,10): - muse.setMute("Strings", False) - muse.setMute("Lead1", True) - time.sleep(1) - muse.setMute("Strings", True) - muse.setMute("Lead1", False) - time.sleep(1) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/repeatpart.py b/attic/muse2-oom/muse2/share/pybridge/examples/repeatpart.py deleted file mode 100644 index e2b8ff31..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/repeatpart.py +++ /dev/null @@ -1,61 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -import sys -import time - -SLEEPIVAL=0.3 - -def advanceToNextSection(muse, newlpos, newrpos): - print "Advancing..." - currpos = muse.getRPos() - curlpos = muse.getLPos() - curpos = muse.getCPos() - muse.setLoop(False) - - while curpos < currpos: - time.sleep(SLEEPIVAL) - curpos = muse.getCPos() - print "Leaving current section..." - muse.setRPos(newrpos) - curpos = muse.getCPos() - - while curpos < newlpos: - time.sleep(SLEEPIVAL) - curpos = muse.getCPos() - print "Entered new section" - muse.setLPos(newlpos) - muse.setLoop(True) - return - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') -muse.stopPlay() -parts = muse.getParts("Track 1") -muse.setLPos(parts[0]['tick']) -muse.setRPos(parts[0]['tick'] + parts[0]['len']) -muse.setCPos(0) -time.sleep(0.2) # Hmmm, don't like it but it seems necessary to pause a short while before starting play -muse.setLoop(True) -muse.startPlay() - -for i in range(1, len(parts)): - part = parts[i] - tick = part['tick'] - len = part['len'] - print "Press enter to advance to next section/part!" - sys.stdin.read(1) - advanceToNextSection(muse, tick, tick + len) - -print "This is the final section. Disabling loop and leaving..." -muse.setLoop(False) - -#print "Press enter to leave final section" -#sys.stdin.read(1) -#muse.setLoop(False) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/setpositionexample.py b/attic/muse2-oom/muse2/share/pybridge/examples/setpositionexample.py deleted file mode 100644 index 476410d9..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/setpositionexample.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" - -import Pyro.core -import time -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') -parts = muse.getParts("Track 1") - -ptick = parts[0]['tick'] -len = parts[0]['len'] -muse.setLPos(ptick) -muse.setRPos(ptick + len) -muse.setCPos(ptick + len / 2) - -songlen = muse.getSongLen() -#print "Song length: " + str(songlen) - -# -# Copy first part to after current song length, thus increase song length with length of first part -# -newsonglen = songlen + parts[0]['len'] -muse.setSongLen(newsonglen) -muse.createPart("Track 1", songlen + 1, parts[0]['len'], parts[0]) -time.sleep(1) - -lastpart = muse.getParts("Track 1").pop() -print lastpart['id'] -muse.deletePart(lastpart['id']) -print muse.getDivision() - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/tempoexample.py b/attic/muse2-oom/muse2/share/pybridge/examples/tempoexample.py deleted file mode 100644 index ed12638d..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/tempoexample.py +++ /dev/null @@ -1,6 +0,0 @@ -import Pyro.core - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') - -print "Tempo: " + str(muse.getTempo(0)) - diff --git a/attic/muse2-oom/muse2/share/pybridge/examples/trackparamchangeexample.py b/attic/muse2-oom/muse2/share/pybridge/examples/trackparamchangeexample.py deleted file mode 100644 index 0681ccb4..00000000 --- a/attic/muse2-oom/muse2/share/pybridge/examples/trackparamchangeexample.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -//========================================================= -// MusE -// Linux Music Editor -// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net) -//========================================================= -""" -import Pyro.core -import time - -muse=Pyro.core.getProxyForURI('PYRONAME://:Default.muse') - -muse.setMidiTrackParameter("Track 1", "velocity",10) -muse.setMidiTrackParameter("Track 1", "compression",101) -muse.setMidiTrackParameter("Track 1", "delay",2) -muse.setMidiTrackParameter("Track 1", "transposition",1) - -for i in range(-127, 127): - muse.setMidiTrackParameter("Track 1", "velocity",i) - time.sleep(0.1) - |