def ARP2end(val=None): # boolean, or "N*" / "*" try: if val != None: arp.play2end = gv.parseBoolean(val) return 1 if arp.play2end else 0 except: return False
def ARPloop(val=None): # boolean, or "N*" / "*" try: if val != None: arp.loop = gv.parseBoolean(val) return 1 if arp.loop else 0 except: return False
def TREMtrill(val=None): # boolean, or "N*" / "*" try: if val != None: LFO.TREMtrill = gv.parseBoolean(val) return 1 if LFO.TREMtrill else 0 except: return False
def notes_sav( val=None): # boolean, but as read variable it's always 0=no/false global newnotemap, nm_map if val != None: if gv.parseBoolean( val ) and nm_map != "": # do we want to save a map and do we know the name to save it ? newnotemap = [] changes_added = False j = 0 for i in range(len(gv.notemap)): if gv.notemap[i][0] != nm_map: newnotemap.append(gv.notemap[i]) else: if not changes_added: # insert all existing/changed/new values at once notes_newmaplines() changes_added = True if not changes_added: notes_newmaplines() gv.currnotemap = nm_map gv.notemap = newnotemap gv.notemaps = [] for m in gv.notemap: if m[0] not in gv.notemaps: gv.notemaps.append(m[0]) if nm_map not in gv.notemaps: nm_map = "" if gv.rootprefix == "": subprocess.call(['mount', '-vo', 'remount,rw', gv.samplesdir]) else: print "Not running dedicated, so no remount as we're most likely already R/W" fname = gv.samplesdir + gv.presetlist[gv.getindex( gv.PRESET, gv.presetlist)][1] + "/" + gv.NOTEMAP_DEF with open(fname, 'w') as mapfile: mapfile.write( "Set,Fractions,Key,Note,Retune,Playvoice,unote\n") for i in range(len(newnotemap)): note = gv.midinote2notename(newnotemap[i][3], newnotemap[i][1]) key = newnotemap[i][2] j = gv.getindex("%d" % key, gv.keynames) if j > 0: key = gv.keynames[j][1] mapfile.write( '%s,%s,%s,%s,%s,%s,%s\n' % (newnotemap[i][0], newnotemap[i][1], key, note, newnotemap[i][4], newnotemap[i][5], newnotemap[i][6])) if gv.rootprefix == "": subprocess.call(['mount', '-vo', 'remount,ro', gv.samplesdir]) return 0
def notes_clear(val=None): if val!=None: if gv.parseBoolean(val): gv.notemapping=[] return False