import neuronSeq import time import rtmidi #an alias for the sleep-function of module time playForSeconds = time.sleep #The fundamental instruments (neurons eg. NNote-objects). kick = neuronSeq.NNote(id="Kick", note=36, velocity=127, duration=0.3, channel=1, activation=0.99, addToCounter=0.0000000000003, threshold=1.0) snare = neuronSeq.NNote(id="Snare", note=38, velocity=70, duration=0.3, channel=1, activation=0.6, addToCounter=0.00000000000000763, threshold=1.0) hihat = neuronSeq.NNote(id="Hihat", note=42, velocity=83, duration=0.3, channel=1, activation=0.1, addToCounter=0.000078,
import neuronSeq import time import rtmidi #an alias for the sleep-function of module time playForSeconds = time.sleep #The fundamental instruments (neurons eg. NNote-objects). kick = neuronSeq.NNote(id="Kick", note=36, velocity=127, duration=0.3, channel=1, activation=0.09, addToCounter=0.09, threshold=1920.0) snare01 = neuronSeq.NNote(id="snare01", note=42, velocity=127, duration=0.0000001, channel=1, activation=0.9, addToCounter=0.0009, threshold=19210.0) somedrum = neuronSeq.NNote(id="somedrum", note=39, velocity=127, duration=0.03, channel=1, activation=0.0009,
import neuronSeq import time kick = neuronSeq.NNote(note=36, duration=0.03, channel=1, velocity=127) snare = neuronSeq.NNote(note=42, duration=0.03, channel=1, velocity=127) hihat = neuronSeq.NNote(note=52, duration=0.06, channel=1, velocity=127) syn01 = neuronSeq.NNote(note=32, duration=0.6, channel=2, velocity=127) tempokick = neuronSeq.NNote(note=36, duration=0.03, channel=3, velocity=127) kick.setNNParams(0.0, 0.0000092, 1.0) snare.setNNParams(0.0, 0.000024, 1.0) hihat.setNNParams(0.0, 0.000008, 1.0) syn01.setNNParams(0.0, 0.00000016, 1.0) tempokick.setNNParams(0.0, 0.0000064, 1.0) conn01 = neuronSeq.Connection(kick, snare, -0.00002, -0.00002) conn02 = neuronSeq.Connection(kick, hihat, -0.0000008, -0.0000008) conn03 = neuronSeq.Connection(kick, syn01, 0.000008, 0.00008) conn04 = neuronSeq.Connection(tempokick, kick, 0.000002, 0.000002) conn01.start() conn02.start() conn03.start() conn04.start() time.sleep(120.0) conn01.stopSeq() conn02.stopSeq() conn03.stopSeq() conn04.stopSeq()
import neuronSeq import time #construct objects and assign midi notes to them. #the note is played when the neuron fires #(or bangs, as I like to call it) kick = neuronSeq.NNote(note=52, duration=0.03, channel=1, velocity=127) snare = neuronSeq.NNote(note=53, duration=0.03, channel=1) snare2 = neuronSeq.NNote(note=55, duration=0.03, velocity=127, channel=1) hihat = neuronSeq.NNote(note=42, duration=0.03, velocity=64, channel=1) #set neural network parameters # being: starting activation, activation increase per iteration # and threshold #The smaller the activation increase (addToCounter) -value, #the slower the oscillation. kick.setNNParams(0.1, 0.0001, 1.0) snare.setNNParams(0.0, 0.0001, 1.0) snare2.setNNParams(0.5, 0.0002, 1.8) hihat.setNNParams(0.0, 0.0003, 1.9) #two-way connections. +/- excites/inhibits #+ results to simultaneous and - to alternating conn1 = neuronSeq.Connection(kick, snare, 0.0000001, 0.0000001) conn2 = neuronSeq.Connection(kick, snare2, 0.00000062, 0.000000199) conn3 = neuronSeq.Connection(snare2, snare, 0.00000008, -0.00000023) #one-way connections: set either weight to 0.0, other to >0.0 conn3_1 = neuronSeq.Connection(snare, snare2, 0.0000000001, 0.0) #just playing with parameters
import neuronSeq import time #construct objects and assign midi notes to them. #the note is played when the neuron fires #(or bangs, as I like to call it) kick = neuronSeq.NNote(note=52, duration = 0.05, channel = 1) snare = neuronSeq.NNote(note=53, duration = 0.05, channel = 1) snare2 = neuronSeq.NNote(note = 55, duration = 0.05, velocity = 127, channel = 1) hihat = neuronSeq.NNote(note = 42, duration = 0.05, velocity = 64, channel = 1) #set neural network parameters # being: starting activation, activation increase per iteration # and threshold #The smaller the activation increase (addToCounter) -value, #the slower the oscillation. kick.setNNParams(0.0, 0.00002199995, 1.0) snare.setNNParams(0.0, 0.0000018999, 1.0) snare2.setNNParams(0.5, 0.0000020295, 1.0) hihat.setNNParams(0.0, 0.0000619, 1.0) #two-way connections. +/- excites/inhibits #+ results to simultaneous and - to alternating conn1 = neuronSeq.Connection(kick, snare, -0.00000026, -0.000000186) conn2 = neuronSeq.Connection(kick, snare2, -0.00000062, -0.000000199) conn3 = neuronSeq.Connection(snare2, snare, 0.00000008, -0.00000023) #one-way connections: set either weight to 0.0, other to >0.0 conn3_1 = neuronSeq.Connection(snare, snare2, 0.0000000001, 0.0) #just playing with parameters
import neuronSeq import time kick = neuronSeq.NNote(note=36, duration=0.06, channel=1, velocity=127) snare = neuronSeq.NNote(note=38, duration=0.06, channel=1, velocity=127) hihat = neuronSeq.NNote(note=42, duration=0.06, channel=1, velocity=127) syn01 = neuronSeq.NNote(note=60, duration=0.6, channel=2, velocity=127) tempokick = neuronSeq.NNote(note=36, duration=0.03, channel=3, velocity=127) kick.setNNParams(0.0, 0.00000092, 1.0) snare.setNNParams(0.0, 0.00000124, 1.0) hihat.setNNParams(0.0, 0.0000008, 1.0) syn01.setNNParams(0.0, 0.00000016, 1.0) tempokick.setNNParams(0.0, 0.0000064, 1.0) #new style strings = neuronSeq.NNote(id="Strings", note=72, velocity=127, duration=0.6, channel=4, activation=0.0, addToCounter=0.0000019, threshold=1.0) conn01 = neuronSeq.Connection(kick, snare, 0.00002, -0.0000002) conn02 = neuronSeq.Connection(kick, hihat, 0.000008, -0.00000008) conn03 = neuronSeq.Connection(kick, syn01, 0.0000008, 0.0000008) conn04 = neuronSeq.Connection(tempokick, kick, 0.000002, -0.000002) conn05 = neuronSeq.Connection(syn01, strings, 0.000000001, -0.00000001)