Example #1
0
def system_volume_set(path, value):  #setVolume
	global volume
	fpgaModuleId = 40
	fpgaValue = msg.value << 9
	#return [fpgaModuleId,fpgaValue/2]
	duplexPort.send(fpgaModuleId,fpgaValue/2)
	return None
Example #2
0
def triggerBlock(msg, modifier):
    fpgaModuleId = 22
    global block
    block = 0 if block > 0 else 65535
    duplexPort.send(fpgaModuleId, block)
    time.sleep(0.001)
    block = 0 if block > 0 else 65535
    duplexPort.send(fpgaModuleId, block)
Example #3
0
def triggerBass(msg, modifier):
    fpgaModuleId = 23
    global bass
    bass = 0 if bass > 0 else 65535
    duplexPort.send(fpgaModuleId, bass)
    time.sleep(0.001)
    bass = 0 if bass > 0 else 65535
    duplexPort.send(fpgaModuleId, bass)
Example #4
0
def toggleExternalClock(msg, modifier):
    if msg.type != "note_on":
        return None
    global externalClock
    externalClock = 0 if externalClock > 0 else 65535
    fpgaModuleId = 31
    #return [fpgaModuleId,externalClock]
    duplexPort.send(fpgaModuleId, externalClock)
Example #5
0
def triggerSnare(msg,modifier):
	fpgaModuleId = 20
	global snare
	snare = 0 if snare > 0 else 65535
	duplexPort.send(fpgaModuleId,snare)
	time.sleep(0.001)
	snare = 0 if snare > 0 else 65535
	duplexPort.send(fpgaModuleId,snare)
Example #6
0
def triggerBass(msg,modifier):
	fpgaModuleId = 23
	global bass
	bass = 0 if bass > 0 else 65535
	duplexPort.send(fpgaModuleId,bass)
	time.sleep(0.001)
	bass = 0 if bass > 0 else 65535
	duplexPort.send(fpgaModuleId,bass)
Example #7
0
def triggerBongo(msg,modifier):
	fpgaModuleId = 21
	global bongo
	bongo = 0 if bongo > 0 else 65535
	duplexPort.send(fpgaModuleId,bongo)
	time.sleep(0.001)
	bongo = 0 if bongo > 0 else 65535
	duplexPort.send(fpgaModuleId,bongo)	
Example #8
0
def triggerBlock(msg,modifier):
	fpgaModuleId = 22
	global block
	block = 0 if block > 0 else 65535
	duplexPort.send(fpgaModuleId,block)
	time.sleep(0.001)
	block = 0 if block > 0 else 65535
	duplexPort.send(fpgaModuleId,block)
Example #9
0
def togglePower(msg, modifier):
    if msg.type != "note_on":
        return None
    global power
    power = 0 if power > 0 else 65535
    fpgaModuleId = 30
    #return [fpgaModuleId,power]
    duplexPort.send(fpgaModuleId, power)
Example #10
0
def toggleExternalClock(msg,modifier):
	if msg.type != "note_on":
		return None
	global externalClock
	externalClock = 0 if externalClock>0 else 65535
	fpgaModuleId = 31
	#return [fpgaModuleId,externalClock]
	duplexPort.send(fpgaModuleId,externalClock)
Example #11
0
def togglePower(msg,modifier):
	if msg.type != "note_on":
		return None
	global power
	power = 0 if power>0 else 65535
	fpgaModuleId = 30
	#return [fpgaModuleId,power]
	duplexPort.send(fpgaModuleId,power)
Example #12
0
def triggerBongo(msg, modifier):
    fpgaModuleId = 21
    global bongo
    bongo = 0 if bongo > 0 else 65535
    duplexPort.send(fpgaModuleId, bongo)
    time.sleep(0.001)
    bongo = 0 if bongo > 0 else 65535
    duplexPort.send(fpgaModuleId, bongo)
Example #13
0
def triggerSnare(msg, modifier):
    fpgaModuleId = 20
    global snare
    snare = 0 if snare > 0 else 65535
    duplexPort.send(fpgaModuleId, snare)
    time.sleep(0.001)
    snare = 0 if snare > 0 else 65535
    duplexPort.send(fpgaModuleId, snare)
Example #14
0
def droneBlock(msg, modifier):
	fpgaModuleId = 13
	if msg.type != "note_on":
		global clock0, clock1, clock2
		clock = int(clock0 + clock1 + clock2/2)
		duplexPort.send(fpgaModuleId,clock)	
	if msg.type != "note_off":
		clock = 0
		duplexPort.send(fpgaModuleId,clock)	
Example #15
0
def instrument_bass_trigger(path, value):  #triggerBass
	fpgaModuleId = 23
	global bass
	bass = 0 if bass > 0 else 65535
	duplexPort.send(fpgaModuleId,bass)
	time.sleep(0.001)
	bass = 0 if bass > 0 else 65535
	duplexPort.send(fpgaModuleId,bass)
	return None
Example #16
0
def droneBlock(msg, modifier):
    fpgaModuleId = 13
    if msg.type != "note_on":
        global clock0, clock1, clock2
        clock = int(clock0 + clock1 + clock2 / 2)
        duplexPort.send(fpgaModuleId, clock)
    if msg.type != "note_off":
        clock = 0
        duplexPort.send(fpgaModuleId, clock)
Example #17
0
def instrument_bongo_trigger(path, value):  #triggerBongo
	fpgaModuleId = 21
	global bongo
	bongo = 0 if bongo > 0 else 65535
	duplexPort.send(fpgaModuleId,bongo)
	time.sleep(0.001)
	bongo = 0 if bongo > 0 else 65535
	duplexPort.send(fpgaModuleId,bongo)	
	return None
Example #18
0
def instrument_snare_trigger(path, value):  #triggerSnare
	fpgaModuleId = 20
	global snare
	snare = 0 if snare > 0 else 65535
	duplexPort.send(fpgaModuleId,snare)
	time.sleep(0.001)
	snare = 0 if snare > 0 else 65535
	duplexPort.send(fpgaModuleId,snare)
	return None
Example #19
0
def system_intExt_set(path, value):  #toggleExternalClock
	if msg.type != "note_on":
		return None
	global externalClock
	externalClock = 0 if externalClock>0 else 65535
	fpgaModuleId = 31
	#return [fpgaModuleId,externalClock]
	duplexPort.send(fpgaModuleId,externalClock)
	return None
Example #20
0
def system_power_set(path, value):  #togglePower
	if msg.type != "note_on":
		return None
	global power
	power = 0 if power>0 else 65535
	fpgaModuleId = 30
	#return [fpgaModuleId,power]
	duplexPort.send(fpgaModuleId,power)
	return None
Example #21
0
def instrument_block_trigger(path, value):  #triggerBlock
	fpgaModuleId = 22
	global block
	block = 0 if block > 0 else 65535
	duplexPort.send(fpgaModuleId,block)
	time.sleep(0.001)
	block = 0 if block > 0 else 65535
	duplexPort.send(fpgaModuleId,block)
	return None
Example #22
0
def instrument_snare_pitch(path, value):  #droneSnare
	fpgaModuleId = 11
	if msg.type == "note_on":
		global clock0, clock1, clock2
		clock = int(clock0 + clock1 + clock2/2)
		duplexPort.send(fpgaModuleId,clock)	
	if msg.type == "note_off":
		clock = 0
		duplexPort.send(fpgaModuleId,clock)	
	return None
Example #23
0
def instrument_brush_pitch(path, value):  #droneBlock
	fpgaModuleId = 15
	if msg.type != "note_on":
		global clock0, clock1, clock2
		clock = int(clock0 + clock1 + clock2/2)
		duplexPort.send(fpgaModuleId,clock)	
	if msg.type != "note_off":
		clock = 0
		duplexPort.send(fpgaModuleId,clock)	
	return None
Example #24
0
def setClockOscillator(msg, modifier):
    global clock0, clock1, clock2
    fpgaModuleId = 10
    if modifier == 0:  # coarse
        v = msg.value / 4
        clock0 = v << 11
    if modifier == 1:  # middle
        v = msg.value / 4
        clock1 = v << 6
    if modifier == 2:  # fine
        clock2 = msg.value / 2
    fpgaValue = int((clock0 + clock1 + clock2) / 2)
    #print fpgaValue
    fpgaValue = fpgaValue if fpgaValue > 0 else fpgaValue + 1
    #return [fpgaModuleId,fpgaValue]
    duplexPort.send(fpgaModuleId, fpgaValue)
Example #25
0
def setClockOscillator(msg,modifier):
	global clock0, clock1, clock2
	fpgaModuleId = 10
	if modifier == 0: # coarse
		v = msg.value / 4
		clock0 = v << 11
	if modifier == 1: # middle 
		v = msg.value / 4
		clock1 = v << 6
	if modifier == 2: # fine
		clock2 = msg.value / 2
	fpgaValue = int((clock0 + clock1 + clock2)/2)
	#print fpgaValue
	fpgaValue = fpgaValue if fpgaValue > 0 else fpgaValue +1
	#return [fpgaModuleId,fpgaValue]
	duplexPort.send(fpgaModuleId,fpgaValue)
Example #26
0
def triggerBrush(msg, modifier):
    global brush
    if msg.type == "note_on":
        fpgaModuleId = 25
        duplexPort.send(fpgaModuleId, 65535)

        fpgaModuleId = 24
        #brush = 0 if brush > 0 else 65535
        #brush = 65535
        duplexPort.send(fpgaModuleId, 0)
        time.sleep(0.001)
        #brush = 0 if brush > 0 else 65535
        brush = 0
        duplexPort.send(fpgaModuleId, 65535)
    else:
        fpgaModuleId = 25
        #brush = 0 if brush > 0 else 65535
        duplexPort.send(fpgaModuleId, 0)
Example #27
0
def triggerBrush(msg,modifier):
	global brush
	if msg.type == "note_on":
		fpgaModuleId = 25
		duplexPort.send(fpgaModuleId,65535)

		fpgaModuleId = 24
		#brush = 0 if brush > 0 else 65535
		#brush = 65535
		duplexPort.send(fpgaModuleId,0)
		time.sleep(0.001)
		#brush = 0 if brush > 0 else 65535
		brush = 0
		duplexPort.send(fpgaModuleId,65535)
	else:
		fpgaModuleId = 25
		#brush = 0 if brush > 0 else 65535
		duplexPort.send(fpgaModuleId,0)
Example #28
0
def instrument_brush_trigger(path, value):  #triggerBrush
	global brush
	if msg.type == "note_on":
		fpgaModuleId = 25
		duplexPort.send(fpgaModuleId,65535)

		fpgaModuleId = 24
		#brush = 0 if brush > 0 else 65535
		#brush = 65535
		duplexPort.send(fpgaModuleId,0)
		time.sleep(0.001)
		#brush = 0 if brush > 0 else 65535
		brush = 0
		duplexPort.send(fpgaModuleId,65535)
	else:
		fpgaModuleId = 25
		#brush = 0 if brush > 0 else 65535
		duplexPort.send(fpgaModuleId,0)
	return None
Example #29
0
def setBalance(msg,modifier):
	global volume
	fpgaModuleId = 41
	fpgaValue = msg.value << 9
	#return [fpgaModuleId,fpgaValue/2]
	duplexPort.send(fpgaModuleId,fpgaValue/2)
Example #30
0
def setBalance(msg, modifier):
    global volume
    fpgaModuleId = 41
    fpgaValue = msg.value << 9
    #return [fpgaModuleId,fpgaValue/2]
    duplexPort.send(fpgaModuleId, fpgaValue / 2)