nxInstrument008

Download all code, records and samples
Download nxInstrument008 2009.04.26 2009.09.26
Download SimpleOSC
Download Piano Soundfont

Python Code:

#!/usr/bin/env python
 
# Python Code:
# nxInstrument008-Launcher.py
# Date: 2009.04.19
# Author: Miquel Parera Jaques
# Target: Patterns Laws
 
import os
import sys
import subprocess
import time
 
# The path:
 
path = os.path.dirname(sys.argv[0])
pathname = os.path.abspath(path)
 
# Open Python
 
subprocess.Popen("python %s/nxInstrument008.py" %(pathname), shell=True)
 
# Open PureData
 
time.sleep(5)
 
subprocess.Popen("pd -noaudio -mididev 5,1 -alsamidi -open %s/nxInstrument008.pd" %(pathname), shell=True)
#!/usr/bin/env python
 
# Python Code:
# nxInstrument008.py
# Date: 2009.04.19
# Author: Miquel Parera Jaques
# Target: Patterns Laws
 
import os
import sys
import random
import time
import subprocess
import numpy
 
# The path:
 
path = os.path.dirname(sys.argv[0])
pathname = os.path.abspath(path)
 
# Basic Scale:
 
nxScaleLong = random.randint(5, 12)
 
nxSuma = numpy.array(range(nxScaleLong))
 
for i in range(nxScaleLong):
 
    nxSuma[i] = random.randint(1,2)
 
nxRootArray = numpy.array([[random.randint(22, 34)]*nxScaleLong])
 
nxSumaSum = nxSuma.cumsum()
 
nxScale = nxSumaSum + nxRootArray
 
nxScale = nxScale[0]
 
# Tempo
 
nxBpm = random.randint(60, 200)
 
nxTempoMs = numpy.array(range(5))
 
nxTempoMs[2] = 60000/nxBpm
nxTempoMs[1] = nxTempoMs[2] * 2
nxTempoMs[0] = nxTempoMs[1] * 2
nxTempoMs[3] = nxTempoMs[2] / 2
nxTempoMs[4] = nxTempoMs[3] / 2
 
nxTempoMsLargo = numpy.array([nxTempoMs[0],nxTempoMs[1],nxTempoMs[2]])
nxTempoMsMedium = numpy.array([nxTempoMs[1],nxTempoMs[2],nxTempoMs[3]])
nxTempoMsRapid = numpy.array([nxTempoMs[2],nxTempoMs[3],nxTempoMs[4]])
 
# Velocity
 
nxVelocityPiano = numpy.array([25, 50, 75])
nxVelocityMedium = numpy.array([50, 75, 100])
nxVelocityForte = numpy.array([75, 100, 125])
 
# Down Patterns
 
nxRootScaleSuma1 = numpy.array([nxSuma, nxSuma])
nxRootScaleSuma1 = numpy.ravel(nxRootScaleSuma1)
nxRootScaleSuma1 = nxRootScaleSuma1.cumsum()
 
nxRootScaleMelody1 = numpy.array([nxRootArray, nxRootArray])
nxRootScaleMelody1 = numpy.ravel(nxRootScaleMelody1)
nxRootScaleMelody1 = nxRootScaleMelody1 + nxRootScaleSuma1
 
# nxPiano1
 
# Pattern1-------------------------------------------------------------------
 
nxPiano1_Pattern1_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano1_Pattern1_Notes = numpy.array(range(nxPiano1_Pattern1_Large))
for i in range(nxPiano1_Pattern1_Large):
    nxPiano1_Pattern1_Notes[i] = random.choice(nxRootScaleMelody1)
nxPiano1_Pattern1_Vel = numpy.array(range(nxPiano1_Pattern1_Large))
nxPiano1_Pattern1_Vel_Dyn = random.randint(0,2)
if nxPiano1_Pattern1_Vel_Dyn == 0:
    nxPiano1_Pattern1_Vel_Dyn = "nxPiano1_Pattern1 [DYN]---> Piano"
    for i in range(nxPiano1_Pattern1_Large):
        if(i%2) == 0:
            nxPiano1_Pattern1_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano1_Pattern1_Vel[i] = 0
if nxPiano1_Pattern1_Vel_Dyn == 1:
    nxPiano1_Pattern1_Vel_Dyn = "nxPiano1_Pattern1 [DYN]---> Medium"
    for i in range(nxPiano1_Pattern1_Large):
        if(i%2) == 0:
            nxPiano1_Pattern1_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano1_Pattern1_Vel[i] = 0
if nxPiano1_Pattern1_Vel_Dyn == 2:
    nxPiano1_Pattern1_Vel_Dyn = "nxPiano1_Pattern1 [DYN]---> Forte"
    for i in range(nxPiano1_Pattern1_Large):
        if(i%2) == 0:
            nxPiano1_Pattern1_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano1_Pattern1_Vel[i] = 0
nxPiano1_Pattern1_Dur = numpy.array(range(nxPiano1_Pattern1_Large))
nxPiano1_Pattern1_Dur_Dur = random.randint(0,2)
if nxPiano1_Pattern1_Dur_Dur == 0:
    nxPiano1_Pattern1_Dur_Dur = "nxPiano1_Pattern1 [DUR]---> Largo"
    for i in range(nxPiano1_Pattern1_Large):
        nxPiano1_Pattern1_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano1_Pattern1_Dur_Dur == 1:
    nxPiano1_Pattern1_Dur_Dur = "nxPiano1_Pattern1 [DUR]---> Medium"
    for i in range(nxPiano1_Pattern1_Large):
        nxPiano1_Pattern1_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano1_Pattern1_Dur_Dur == 2:
    nxPiano1_Pattern1_Dur_Dur = "nxPiano1_Pattern1 [DUR]---> Rapid"
    for i in range(nxPiano1_Pattern1_Large):
        nxPiano1_Pattern1_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern2-------------------------------------------------------------------
 
nxPiano1_Pattern2_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano1_Pattern2_Notes = numpy.array(range(nxPiano1_Pattern2_Large))
for i in range(nxPiano1_Pattern2_Large):
    nxPiano1_Pattern2_Notes[i] = random.choice(nxRootScaleMelody1)
nxPiano1_Pattern2_Vel = numpy.array(range(nxPiano1_Pattern2_Large))
nxPiano1_Pattern2_Vel_Dyn = random.randint(0,2)
if nxPiano1_Pattern2_Vel_Dyn == 0:
    nxPiano1_Pattern2_Vel_Dyn = "nxPiano1_Pattern2 [DYN]---> Piano"
    for i in range(nxPiano1_Pattern2_Large):
        if(i%2) == 0:
            nxPiano1_Pattern2_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano1_Pattern2_Vel[i] = 0
if nxPiano1_Pattern2_Vel_Dyn == 1:
    nxPiano1_Pattern2_Vel_Dyn = "nxPiano1_Pattern2 [DYN]---> Medium"
    for i in range(nxPiano1_Pattern2_Large):
        if(i%2) == 0:
            nxPiano1_Pattern2_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano1_Pattern2_Vel[i] = 0
if nxPiano1_Pattern2_Vel_Dyn == 2:
    nxPiano1_Pattern2_Vel_Dyn = "nxPiano1_Pattern2 [DYN]---> Forte"
    for i in range(nxPiano1_Pattern2_Large):
        if(i%2) == 0:
            nxPiano1_Pattern2_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano1_Pattern2_Vel[i] = 0
nxPiano1_Pattern2_Dur = numpy.array(range(nxPiano1_Pattern2_Large))
nxPiano1_Pattern2_Dur_Dur = random.randint(0,2)
if nxPiano1_Pattern2_Dur_Dur == 0:
    nxPiano1_Pattern2_Dur_Dur = "nxPiano1_Pattern2 [DUR]---> Largo"
    for i in range(nxPiano1_Pattern2_Large):
        nxPiano1_Pattern2_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano1_Pattern2_Dur_Dur == 1:
    nxPiano1_Pattern2_Dur_Dur = "nxPiano1_Pattern2 [DUR]---> Medium"
    for i in range(nxPiano1_Pattern2_Large):
        nxPiano1_Pattern2_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano1_Pattern2_Dur_Dur == 2:
    nxPiano1_Pattern2_Dur_Dur = "nxPiano1_Pattern2 [DUR]---> Rapid"
    for i in range(nxPiano1_Pattern2_Large):
        nxPiano1_Pattern2_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern3-------------------------------------------------------------------
 
nxPiano1_Pattern3_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano1_Pattern3_Notes = numpy.array(range(nxPiano1_Pattern3_Large))
for i in range(nxPiano1_Pattern3_Large):
    nxPiano1_Pattern3_Notes[i] = random.choice(nxRootScaleMelody1)
nxPiano1_Pattern3_Vel = numpy.array(range(nxPiano1_Pattern3_Large))
nxPiano1_Pattern3_Vel_Dyn = random.randint(0,2)
if nxPiano1_Pattern3_Vel_Dyn == 0:
    nxPiano1_Pattern3_Vel_Dyn = "nxPiano1_Pattern3 [DYN]---> Piano"
    for i in range(nxPiano1_Pattern3_Large):
        if(i%2) == 0:
            nxPiano1_Pattern3_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano1_Pattern3_Vel[i] = 0
if nxPiano1_Pattern3_Vel_Dyn == 1:
    nxPiano1_Pattern3_Vel_Dyn = "nxPiano1_Pattern3 [DYN]---> Medium"
    for i in range(nxPiano1_Pattern3_Large):
        if(i%2) == 0:
            nxPiano1_Pattern3_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano1_Pattern3_Vel[i] = 0
if nxPiano1_Pattern3_Vel_Dyn == 2:
    nxPiano1_Pattern3_Vel_Dyn = "nxPiano1_Pattern3 [DYN]---> Forte"
    for i in range(nxPiano1_Pattern3_Large):
        if(i%2) == 0:
            nxPiano1_Pattern3_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano1_Pattern3_Vel[i] = 0
nxPiano1_Pattern3_Dur = numpy.array(range(nxPiano1_Pattern3_Large))
nxPiano1_Pattern3_Dur_Dur = random.randint(0,2)
if nxPiano1_Pattern3_Dur_Dur == 0:
    nxPiano1_Pattern3_Dur_Dur = "nxPiano1_Pattern3 [DUR]---> Largo"
    for i in range(nxPiano1_Pattern3_Large):
        nxPiano1_Pattern3_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano1_Pattern3_Dur_Dur == 1:
    nxPiano1_Pattern3_Dur_Dur = "nxPiano1_Pattern3 [DUR]---> Medium"
    for i in range(nxPiano1_Pattern3_Large):
        nxPiano1_Pattern3_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano1_Pattern3_Dur_Dur == 2:
    nxPiano1_Pattern3_Dur_Dur = "nxPiano1_Pattern3 [DUR]---> Rapid"
    for i in range(nxPiano1_Pattern3_Large):
        nxPiano1_Pattern3_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern4-------------------------------------------------------------------
 
nxPiano1_Pattern4_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano1_Pattern4_Notes = numpy.array(range(nxPiano1_Pattern4_Large))
for i in range(nxPiano1_Pattern4_Large):
    nxPiano1_Pattern4_Notes[i] = random.choice(nxRootScaleMelody1)
nxPiano1_Pattern4_Vel = numpy.array(range(nxPiano1_Pattern4_Large))
nxPiano1_Pattern4_Vel_Dyn = random.randint(0,2)
if nxPiano1_Pattern4_Vel_Dyn == 0:
    nxPiano1_Pattern4_Vel_Dyn = "nxPiano1_Pattern4 [DYN]---> Piano"
    for i in range(nxPiano1_Pattern4_Large):
        if(i%2) == 0:
            nxPiano1_Pattern4_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano1_Pattern4_Vel[i] = 0
if nxPiano1_Pattern4_Vel_Dyn == 1:
    nxPiano1_Pattern4_Vel_Dyn = "nxPiano1_Pattern4 [DYN]---> Medium"
    for i in range(nxPiano1_Pattern4_Large):
        if(i%2) == 0:
            nxPiano1_Pattern4_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano1_Pattern4_Vel[i] = 0
if nxPiano1_Pattern4_Vel_Dyn == 2:
    nxPiano1_Pattern4_Vel_Dyn = "nxPiano1_Pattern4 [DYN]---> Forte"
    for i in range(nxPiano1_Pattern4_Large):
        if(i%2) == 0:
            nxPiano1_Pattern4_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano1_Pattern4_Vel[i] = 0
nxPiano1_Pattern4_Dur = numpy.array(range(nxPiano1_Pattern4_Large))
nxPiano1_Pattern4_Dur_Dur = random.randint(0,2)
if nxPiano1_Pattern4_Dur_Dur == 0:
    nxPiano1_Pattern4_Dur_Dur = "nxPiano1_Pattern4 [DUR]---> Largo"
    for i in range(nxPiano1_Pattern4_Large):
        nxPiano1_Pattern4_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano1_Pattern4_Dur_Dur == 1:
    nxPiano1_Pattern4_Dur_Dur = "nxPiano1_Pattern4 [DUR]---> Medium"
    for i in range(nxPiano1_Pattern4_Large):
        nxPiano1_Pattern4_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano1_Pattern4_Dur_Dur == 2:
    nxPiano1_Pattern4_Dur_Dur = "nxPiano1_Pattern4 [DUR]---> Rapid"
    for i in range(nxPiano1_Pattern4_Large):
        nxPiano1_Pattern4_Dur[i] = random.choice(nxTempoMsRapid)
 
# nxSynth1
 
# Pattern1-------------------------------------------------------------------
 
nxSynth1_Pattern1_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth1_Pattern1_Notes = numpy.array(range(nxSynth1_Pattern1_Large))
for i in range(nxSynth1_Pattern1_Large):
    nxSynth1_Pattern1_Notes[i] = random.choice(nxRootScaleMelody1)
nxSynth1_Pattern1_Vel = numpy.array(range(nxSynth1_Pattern1_Large))
nxSynth1_Pattern1_Vel_Dyn = random.randint(0,2)
if nxSynth1_Pattern1_Vel_Dyn == 0:
    nxSynth1_Pattern1_Vel_Dyn = "nxSynth1_Pattern1 [DYN]---> Piano"
    for i in range(nxSynth1_Pattern1_Large):
        if(i%2) == 0:
            nxSynth1_Pattern1_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth1_Pattern1_Vel[i] = 0
if nxSynth1_Pattern1_Vel_Dyn == 1:
    nxSynth1_Pattern1_Vel_Dyn = "nxSynth1_Pattern1 [DYN]---> Medium"
    for i in range(nxSynth1_Pattern1_Large):
        if(i%2) == 0:
            nxSynth1_Pattern1_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth1_Pattern1_Vel[i] = 0
if nxSynth1_Pattern1_Vel_Dyn == 2:
    nxSynth1_Pattern1_Vel_Dyn = "nxSynth1_Pattern1 [DYN]---> Forte"
    for i in range(nxSynth1_Pattern1_Large):
        if(i%2) == 0:
            nxSynth1_Pattern1_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth1_Pattern1_Vel[i] = 0
nxSynth1_Pattern1_Dur = numpy.array(range(nxSynth1_Pattern1_Large))
nxSynth1_Pattern1_Dur_Dur = random.randint(0,2)
if nxSynth1_Pattern1_Dur_Dur == 0:
    nxSynth1_Pattern1_Dur_Dur = "nxSynth1_Pattern1 [DUR]---> Largo"
    for i in range(nxSynth1_Pattern1_Large):
        nxSynth1_Pattern1_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth1_Pattern1_Dur_Dur == 1:
    nxSynth1_Pattern1_Dur_Dur = "nxSynth1_Pattern1 [DUR]---> Medium"
    for i in range(nxSynth1_Pattern1_Large):
        nxSynth1_Pattern1_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth1_Pattern1_Dur_Dur == 2:
    nxSynth1_Pattern1_Dur_Dur = "nxSynth1_Pattern1 [DUR]---> Rapid"
    for i in range(nxSynth1_Pattern1_Large):
        nxSynth1_Pattern1_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern2-------------------------------------------------------------------
 
nxSynth1_Pattern2_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth1_Pattern2_Notes = numpy.array(range(nxSynth1_Pattern2_Large))
for i in range(nxSynth1_Pattern2_Large):
    nxSynth1_Pattern2_Notes[i] = random.choice(nxRootScaleMelody1)
nxSynth1_Pattern2_Vel = numpy.array(range(nxSynth1_Pattern2_Large))
nxSynth1_Pattern2_Vel_Dyn = random.randint(0,2)
if nxSynth1_Pattern2_Vel_Dyn == 0:
    nxSynth1_Pattern2_Vel_Dyn = "nxSynth1_Pattern2 [DYN]---> Piano"
    for i in range(nxSynth1_Pattern2_Large):
        if(i%2) == 0:
            nxSynth1_Pattern2_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth1_Pattern2_Vel[i] = 0
if nxSynth1_Pattern2_Vel_Dyn == 1:
    nxSynth1_Pattern2_Vel_Dyn = "nxSynth1_Pattern2 [DYN]---> Medium"
    for i in range(nxSynth1_Pattern2_Large):
        if(i%2) == 0:
            nxSynth1_Pattern2_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth1_Pattern2_Vel[i] = 0
if nxSynth1_Pattern2_Vel_Dyn == 2:
    nxSynth1_Pattern2_Vel_Dyn = "nxSynth1_Pattern2 [DYN]---> Forte"
    for i in range(nxSynth1_Pattern2_Large):
        if(i%2) == 0:
            nxSynth1_Pattern2_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth1_Pattern2_Vel[i] = 0
nxSynth1_Pattern2_Dur = numpy.array(range(nxSynth1_Pattern2_Large))
nxSynth1_Pattern2_Dur_Dur = random.randint(0,2)
if nxSynth1_Pattern2_Dur_Dur == 0:
    nxSynth1_Pattern2_Dur_Dur = "nxSynth1_Pattern2 [DUR]---> Largo"
    for i in range(nxSynth1_Pattern2_Large):
        nxSynth1_Pattern2_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth1_Pattern2_Dur_Dur == 1:
    nxSynth1_Pattern2_Dur_Dur = "nxSynth1_Pattern2 [DUR]---> Medium"
    for i in range(nxSynth1_Pattern2_Large):
        nxSynth1_Pattern2_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth1_Pattern2_Dur_Dur == 2:
    nxSynth1_Pattern2_Dur_Dur = "nxSynth1_Pattern2 [DUR]---> Rapid"
    for i in range(nxSynth1_Pattern2_Large):
        nxSynth1_Pattern2_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern3-------------------------------------------------------------------
 
nxSynth1_Pattern3_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth1_Pattern3_Notes = numpy.array(range(nxSynth1_Pattern3_Large))
for i in range(nxSynth1_Pattern3_Large):
    nxSynth1_Pattern3_Notes[i] = random.choice(nxRootScaleMelody1)
nxSynth1_Pattern3_Vel = numpy.array(range(nxSynth1_Pattern3_Large))
nxSynth1_Pattern3_Vel_Dyn = random.randint(0,2)
if nxSynth1_Pattern3_Vel_Dyn == 0:
    nxSynth1_Pattern3_Vel_Dyn = "nxSynth1_Pattern3 [DYN]---> Piano"
    for i in range(nxSynth1_Pattern3_Large):
        if(i%2) == 0:
            nxSynth1_Pattern3_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth1_Pattern3_Vel[i] = 0
if nxSynth1_Pattern3_Vel_Dyn == 1:
    nxSynth1_Pattern3_Vel_Dyn = "nxSynth1_Pattern3 [DYN]---> Medium"
    for i in range(nxSynth1_Pattern3_Large):
        if(i%2) == 0:
            nxSynth1_Pattern3_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth1_Pattern3_Vel[i] = 0
if nxSynth1_Pattern3_Vel_Dyn == 2:
    nxSynth1_Pattern3_Vel_Dyn = "nxSynth1_Pattern3 [DYN]---> Forte"
    for i in range(nxSynth1_Pattern3_Large):
        if(i%2) == 0:
            nxSynth1_Pattern3_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth1_Pattern3_Vel[i] = 0
nxSynth1_Pattern3_Dur = numpy.array(range(nxSynth1_Pattern3_Large))
nxSynth1_Pattern3_Dur_Dur = random.randint(0,2)
if nxSynth1_Pattern3_Dur_Dur == 0:
    nxSynth1_Pattern3_Dur_Dur = "nxSynth1_Pattern3 [DUR]---> Largo"
    for i in range(nxSynth1_Pattern3_Large):
        nxSynth1_Pattern3_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth1_Pattern3_Dur_Dur == 1:
    nxSynth1_Pattern3_Dur_Dur = "nxSynth1_Pattern3 [DUR]---> Medium"
    for i in range(nxSynth1_Pattern3_Large):
        nxSynth1_Pattern3_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth1_Pattern3_Dur_Dur == 2:
    nxSynth1_Pattern3_Dur_Dur = "nxSynth1_Pattern3 [DUR]---> Rapid"
    for i in range(nxSynth1_Pattern3_Large):
        nxSynth1_Pattern3_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern4-------------------------------------------------------------------
 
nxSynth1_Pattern4_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth1_Pattern4_Notes = numpy.array(range(nxSynth1_Pattern4_Large))
for i in range(nxSynth1_Pattern4_Large):
    nxSynth1_Pattern4_Notes[i] = random.choice(nxRootScaleMelody1)
nxSynth1_Pattern4_Vel = numpy.array(range(nxSynth1_Pattern4_Large))
nxSynth1_Pattern4_Vel_Dyn = random.randint(0,2)
if nxSynth1_Pattern4_Vel_Dyn == 0:
    nxSynth1_Pattern4_Vel_Dyn = "nxSynth1_Pattern4 [DYN]---> Piano"
    for i in range(nxSynth1_Pattern4_Large):
        if(i%2) == 0:
            nxSynth1_Pattern4_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth1_Pattern4_Vel[i] = 0
if nxSynth1_Pattern4_Vel_Dyn == 1:
    nxSynth1_Pattern4_Vel_Dyn = "nxSynth1_Pattern4 [DYN]---> Medium"
    for i in range(nxSynth1_Pattern4_Large):
        if(i%2) == 0:
            nxSynth1_Pattern4_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth1_Pattern4_Vel[i] = 0
if nxSynth1_Pattern4_Vel_Dyn == 2:
    nxSynth1_Pattern4_Vel_Dyn = "nxSynth1_Pattern4 [DYN]---> Forte"
    for i in range(nxSynth1_Pattern4_Large):
        if(i%2) == 0:
            nxSynth1_Pattern4_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth1_Pattern4_Vel[i] = 0
nxSynth1_Pattern4_Dur = numpy.array(range(nxSynth1_Pattern4_Large))
nxSynth1_Pattern4_Dur_Dur = random.randint(0,2)
if nxSynth1_Pattern4_Dur_Dur == 0:
    nxSynth1_Pattern4_Dur_Dur = "nxSynth1_Pattern4 [DUR]---> Largo"
    for i in range(nxSynth1_Pattern4_Large):
        nxSynth1_Pattern4_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth1_Pattern4_Dur_Dur == 1:
    nxSynth1_Pattern4_Dur_Dur = "nxSynth1_Pattern4 [DUR]---> Medium"
    for i in range(nxSynth1_Pattern4_Large):
        nxSynth1_Pattern4_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth1_Pattern4_Dur_Dur == 2:
    nxSynth1_Pattern4_Dur_Dur = "nxSynth1_Pattern4 [DUR]---> Rapid"
    for i in range(nxSynth1_Pattern4_Large):
        nxSynth1_Pattern4_Dur[i] = random.choice(nxTempoMsRapid)
 
# Up Patterns
 
nxRootScaleSuma2 = numpy.array([nxSuma, nxSuma, nxSuma, nxSuma])
nxRootScaleSuma2 = numpy.ravel(nxRootScaleSuma2)
nxRootScaleSuma2 = nxRootScaleSuma2.cumsum()
 
nxRootScaleMelody2n = numpy.array([nxRootArray, nxRootArray, nxRootArray, nxRootArray])
nxRootScaleMelody2n = numpy.ravel(nxRootScaleMelody2n)
nxRootScaleMelody2n = nxRootScaleMelody2n + nxRootScaleSuma2
 
nxScissor = nxScaleLong * 2
 
nxRootScaleMelody2 = numpy.array(range(nxScissor))
 
for i in range(nxScissor):
 
    nxRootScaleMelody2[i] = nxRootScaleMelody2n[i + nxScissor]
 
# nxPiano2
 
# Pattern1-------------------------------------------------------------------
 
nxPiano2_Pattern1_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano2_Pattern1_Notes = numpy.array(range(nxPiano2_Pattern1_Large))
for i in range(nxPiano2_Pattern1_Large):
    nxPiano2_Pattern1_Notes[i] = random.choice(nxRootScaleMelody2)
nxPiano2_Pattern1_Vel = numpy.array(range(nxPiano2_Pattern1_Large))
nxPiano2_Pattern1_Vel_Dyn = random.randint(0,2)
if nxPiano2_Pattern1_Vel_Dyn == 0:
    nxPiano2_Pattern1_Vel_Dyn = "nxPiano2_Pattern1 [DYN]---> Piano"
    for i in range(nxPiano2_Pattern1_Large):
        if(i%2) == 0:
            nxPiano2_Pattern1_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano2_Pattern1_Vel[i] = 0
if nxPiano2_Pattern1_Vel_Dyn == 1:
    nxPiano2_Pattern1_Vel_Dyn = "nxPiano2_Pattern1 [DYN]---> Medium"
    for i in range(nxPiano2_Pattern1_Large):
        if(i%2) == 0:
            nxPiano2_Pattern1_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano2_Pattern1_Vel[i] = 0
if nxPiano2_Pattern1_Vel_Dyn == 2:
    nxPiano2_Pattern1_Vel_Dyn = "nxPiano2_Pattern1 [DYN]---> Forte"
    for i in range(nxPiano2_Pattern1_Large):
        if(i%2) == 0:
            nxPiano2_Pattern1_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano2_Pattern1_Vel[i] = 0
nxPiano2_Pattern1_Dur = numpy.array(range(nxPiano2_Pattern1_Large))
nxPiano2_Pattern1_Dur_Dur = random.randint(0,2)
if nxPiano2_Pattern1_Dur_Dur == 0:
    nxPiano2_Pattern1_Dur_Dur = "nxPiano2_Pattern1 [DUR]---> Largo"
    for i in range(nxPiano2_Pattern1_Large):
        nxPiano2_Pattern1_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano2_Pattern1_Dur_Dur == 1:
    nxPiano2_Pattern1_Dur_Dur = "nxPiano2_Pattern1 [DUR]---> Medium"
    for i in range(nxPiano2_Pattern1_Large):
        nxPiano2_Pattern1_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano2_Pattern1_Dur_Dur == 2:
    nxPiano2_Pattern1_Dur_Dur = "nxPiano2_Pattern1 [DUR]---> Rapid"
    for i in range(nxPiano2_Pattern1_Large):
        nxPiano2_Pattern1_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern2-------------------------------------------------------------------
 
nxPiano2_Pattern2_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano2_Pattern2_Notes = numpy.array(range(nxPiano2_Pattern2_Large))
for i in range(nxPiano2_Pattern2_Large):
    nxPiano2_Pattern2_Notes[i] = random.choice(nxRootScaleMelody2)
nxPiano2_Pattern2_Vel = numpy.array(range(nxPiano2_Pattern2_Large))
nxPiano2_Pattern2_Vel_Dyn = random.randint(0,2)
if nxPiano2_Pattern2_Vel_Dyn == 0:
    nxPiano2_Pattern2_Vel_Dyn = "nxPiano2_Pattern2 [DYN]---> Piano"
    for i in range(nxPiano2_Pattern2_Large):
        if(i%2) == 0:
            nxPiano2_Pattern2_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano2_Pattern2_Vel[i] = 0
if nxPiano2_Pattern2_Vel_Dyn == 1:
    nxPiano2_Pattern2_Vel_Dyn = "nxPiano2_Pattern2 [DYN]---> Medium"
    for i in range(nxPiano2_Pattern2_Large):
        if(i%2) == 0:
            nxPiano2_Pattern2_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano2_Pattern2_Vel[i] = 0
if nxPiano2_Pattern2_Vel_Dyn == 2:
    nxPiano2_Pattern2_Vel_Dyn = "nxPiano2_Pattern2 [DYN]---> Forte"
    for i in range(nxPiano2_Pattern2_Large):
        if(i%2) == 0:
            nxPiano2_Pattern2_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano2_Pattern2_Vel[i] = 0
nxPiano2_Pattern2_Dur = numpy.array(range(nxPiano2_Pattern2_Large))
nxPiano2_Pattern2_Dur_Dur = random.randint(0,2)
if nxPiano2_Pattern2_Dur_Dur == 0:
    nxPiano2_Pattern2_Dur_Dur = "nxPiano2_Pattern2 [DUR]---> Largo"
    for i in range(nxPiano2_Pattern2_Large):
        nxPiano2_Pattern2_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano2_Pattern2_Dur_Dur == 1:
    nxPiano2_Pattern2_Dur_Dur = "nxPiano2_Pattern2 [DUR]---> Medium"
    for i in range(nxPiano2_Pattern2_Large):
        nxPiano2_Pattern2_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano2_Pattern2_Dur_Dur == 2:
    nxPiano2_Pattern2_Dur_Dur = "nxPiano2_Pattern2 [DUR]---> Rapid"
    for i in range(nxPiano2_Pattern2_Large):
        nxPiano2_Pattern2_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern3-------------------------------------------------------------------
 
nxPiano2_Pattern3_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano2_Pattern3_Notes = numpy.array(range(nxPiano2_Pattern3_Large))
for i in range(nxPiano2_Pattern3_Large):
    nxPiano2_Pattern3_Notes[i] = random.choice(nxRootScaleMelody2)
nxPiano2_Pattern3_Vel = numpy.array(range(nxPiano2_Pattern3_Large))
nxPiano2_Pattern3_Vel_Dyn = random.randint(0,2)
if nxPiano2_Pattern3_Vel_Dyn == 0:
    nxPiano2_Pattern3_Vel_Dyn = "nxPiano2_Pattern3 [DYN]---> Piano"
    for i in range(nxPiano2_Pattern3_Large):
        if(i%2) == 0:
            nxPiano2_Pattern3_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano2_Pattern3_Vel[i] = 0
if nxPiano2_Pattern3_Vel_Dyn == 1:
    nxPiano2_Pattern3_Vel_Dyn = "nxPiano2_Pattern3 [DYN]---> Medium"
    for i in range(nxPiano2_Pattern3_Large):
        if(i%2) == 0:
            nxPiano2_Pattern3_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano2_Pattern3_Vel[i] = 0
if nxPiano2_Pattern3_Vel_Dyn == 2:
    nxPiano2_Pattern3_Vel_Dyn = "nxPiano2_Pattern3 [DYN]---> Forte"
    for i in range(nxPiano2_Pattern3_Large):
        if(i%2) == 0:
            nxPiano2_Pattern3_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano2_Pattern3_Vel[i] = 0
nxPiano2_Pattern3_Dur = numpy.array(range(nxPiano2_Pattern3_Large))
nxPiano2_Pattern3_Dur_Dur = random.randint(0,2)
if nxPiano2_Pattern3_Dur_Dur == 0:
    nxPiano2_Pattern3_Dur_Dur = "nxPiano2_Pattern3 [DUR]---> Largo"
    for i in range(nxPiano2_Pattern3_Large):
        nxPiano2_Pattern3_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano2_Pattern3_Dur_Dur == 1:
    nxPiano2_Pattern3_Dur_Dur = "nxPiano2_Pattern3 [DUR]---> Medium"
    for i in range(nxPiano2_Pattern3_Large):
        nxPiano2_Pattern3_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano2_Pattern3_Dur_Dur == 2:
    nxPiano2_Pattern3_Dur_Dur = "nxPiano2_Pattern3 [DUR]---> Rapid"
    for i in range(nxPiano2_Pattern3_Large):
        nxPiano2_Pattern3_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern4-------------------------------------------------------------------
 
nxPiano2_Pattern4_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxPiano2_Pattern4_Notes = numpy.array(range(nxPiano2_Pattern4_Large))
for i in range(nxPiano2_Pattern4_Large):
    nxPiano2_Pattern4_Notes[i] = random.choice(nxRootScaleMelody2)
nxPiano2_Pattern4_Vel = numpy.array(range(nxPiano2_Pattern4_Large))
nxPiano2_Pattern4_Vel_Dyn = random.randint(0,2)
if nxPiano2_Pattern4_Vel_Dyn == 0:
    nxPiano2_Pattern4_Vel_Dyn = "nxPiano2_Pattern4 [DYN]---> Piano"
    for i in range(nxPiano2_Pattern4_Large):
        if(i%2) == 0:
            nxPiano2_Pattern4_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxPiano2_Pattern4_Vel[i] = 0
if nxPiano2_Pattern4_Vel_Dyn == 1:
    nxPiano2_Pattern4_Vel_Dyn = "nxPiano2_Pattern4 [DYN]---> Medium"
    for i in range(nxPiano2_Pattern4_Large):
        if(i%2) == 0:
            nxPiano2_Pattern4_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxPiano2_Pattern4_Vel[i] = 0
if nxPiano2_Pattern4_Vel_Dyn == 2:
    nxPiano2_Pattern4_Vel_Dyn = "nxPiano2_Pattern4 [DYN]---> Forte"
    for i in range(nxPiano2_Pattern4_Large):
        if(i%2) == 0:
            nxPiano2_Pattern4_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxPiano2_Pattern4_Vel[i] = 0
nxPiano2_Pattern4_Dur = numpy.array(range(nxPiano2_Pattern4_Large))
nxPiano2_Pattern4_Dur_Dur = random.randint(0,2)
if nxPiano2_Pattern4_Dur_Dur == 0:
    nxPiano2_Pattern4_Dur_Dur = "nxPiano2_Pattern4 [DUR]---> Largo"
    for i in range(nxPiano2_Pattern4_Large):
        nxPiano2_Pattern4_Dur[i] = random.choice(nxTempoMsLargo)
if nxPiano2_Pattern4_Dur_Dur == 1:
    nxPiano2_Pattern4_Dur_Dur = "nxPiano2_Pattern4 [DUR]---> Medium"
    for i in range(nxPiano2_Pattern4_Large):
        nxPiano2_Pattern4_Dur[i] = random.choice(nxTempoMsMedium)
if nxPiano2_Pattern4_Dur_Dur == 2:
    nxPiano2_Pattern4_Dur_Dur = "nxPiano2_Pattern4 [DUR]---> Rapid"
    for i in range(nxPiano2_Pattern4_Large):
        nxPiano2_Pattern4_Dur[i] = random.choice(nxTempoMsRapid)
 
# nxSynth2
 
# Pattern1-------------------------------------------------------------------
 
nxSynth2_Pattern1_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth2_Pattern1_Notes = numpy.array(range(nxSynth2_Pattern1_Large))
for i in range(nxSynth2_Pattern1_Large):
    nxSynth2_Pattern1_Notes[i] = random.choice(nxRootScaleMelody2)
nxSynth2_Pattern1_Vel = numpy.array(range(nxSynth2_Pattern1_Large))
nxSynth2_Pattern1_Vel_Dyn = random.randint(0,2)
if nxSynth2_Pattern1_Vel_Dyn == 0:
    nxSynth2_Pattern1_Vel_Dyn = "nxSynth2_Pattern1 [DYN]---> Piano"
    for i in range(nxSynth2_Pattern1_Large):
        if(i%2) == 0:
            nxSynth2_Pattern1_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth2_Pattern1_Vel[i] = 0
if nxSynth2_Pattern1_Vel_Dyn == 1:
    nxSynth2_Pattern1_Vel_Dyn = "nxSynth2_Pattern1 [DYN]---> Medium"
    for i in range(nxSynth2_Pattern1_Large):
        if(i%2) == 0:
            nxSynth2_Pattern1_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth2_Pattern1_Vel[i] = 0
if nxSynth2_Pattern1_Vel_Dyn == 2:
    nxSynth2_Pattern1_Vel_Dyn = "nxSynth2_Pattern1 [DYN]---> Forte"
    for i in range(nxSynth2_Pattern1_Large):
        if(i%2) == 0:
            nxSynth2_Pattern1_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth2_Pattern1_Vel[i] = 0
nxSynth2_Pattern1_Dur = numpy.array(range(nxSynth2_Pattern1_Large))
nxSynth2_Pattern1_Dur_Dur = random.randint(0,2)
if nxSynth2_Pattern1_Dur_Dur == 0:
    nxSynth2_Pattern1_Dur_Dur = "nxSynth2_Pattern1 [DUR]---> Largo"
    for i in range(nxSynth2_Pattern1_Large):
        nxSynth2_Pattern1_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth2_Pattern1_Dur_Dur == 1:
    nxSynth2_Pattern1_Dur_Dur = "nxSynth2_Pattern1 [DUR]---> Medium"
    for i in range(nxSynth2_Pattern1_Large):
        nxSynth2_Pattern1_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth2_Pattern1_Dur_Dur == 2:
    nxSynth2_Pattern1_Dur_Dur = "nxSynth2_Pattern1 [DUR]---> Rapid"
    for i in range(nxSynth2_Pattern1_Large):
        nxSynth2_Pattern1_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern2-------------------------------------------------------------------
 
nxSynth2_Pattern2_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth2_Pattern2_Notes = numpy.array(range(nxSynth2_Pattern2_Large))
for i in range(nxSynth2_Pattern2_Large):
    nxSynth2_Pattern2_Notes[i] = random.choice(nxRootScaleMelody2)
nxSynth2_Pattern2_Vel = numpy.array(range(nxSynth2_Pattern2_Large))
nxSynth2_Pattern2_Vel_Dyn = random.randint(0,2)
if nxSynth2_Pattern2_Vel_Dyn == 0:
    nxSynth2_Pattern2_Vel_Dyn = "nxSynth2_Pattern2 [DYN]---> Piano"
    for i in range(nxSynth2_Pattern2_Large):
        if(i%2) == 0:
            nxSynth2_Pattern2_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth2_Pattern2_Vel[i] = 0
if nxSynth2_Pattern2_Vel_Dyn == 1:
    nxSynth2_Pattern2_Vel_Dyn = "nxSynth2_Pattern2 [DYN]---> Medium"
    for i in range(nxSynth2_Pattern2_Large):
        if(i%2) == 0:
            nxSynth2_Pattern2_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth2_Pattern2_Vel[i] = 0
if nxSynth2_Pattern2_Vel_Dyn == 2:
    nxSynth2_Pattern2_Vel_Dyn = "nxSynth2_Pattern2 [DYN]---> Forte"
    for i in range(nxSynth2_Pattern2_Large):
        if(i%2) == 0:
            nxSynth2_Pattern2_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth2_Pattern2_Vel[i] = 0
nxSynth2_Pattern2_Dur = numpy.array(range(nxSynth2_Pattern2_Large))
nxSynth2_Pattern2_Dur_Dur = random.randint(0,2)
if nxSynth2_Pattern2_Dur_Dur == 0:
    nxSynth2_Pattern2_Dur_Dur = "nxSynth2_Pattern2 [DUR]---> Largo"
    for i in range(nxSynth2_Pattern2_Large):
        nxSynth2_Pattern2_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth2_Pattern2_Dur_Dur == 1:
    nxSynth2_Pattern2_Dur_Dur = "nxSynth2_Pattern2 [DUR]---> Medium"
    for i in range(nxSynth2_Pattern2_Large):
        nxSynth2_Pattern2_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth2_Pattern2_Dur_Dur == 2:
    nxSynth2_Pattern2_Dur_Dur = "nxSynth2_Pattern2 [DUR]---> Rapid"
    for i in range(nxSynth2_Pattern2_Large):
        nxSynth2_Pattern2_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern3-------------------------------------------------------------------
 
nxSynth2_Pattern3_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth2_Pattern3_Notes = numpy.array(range(nxSynth2_Pattern3_Large))
for i in range(nxSynth2_Pattern3_Large):
    nxSynth2_Pattern3_Notes[i] = random.choice(nxRootScaleMelody2)
nxSynth2_Pattern3_Vel = numpy.array(range(nxSynth2_Pattern3_Large))
nxSynth2_Pattern3_Vel_Dyn = random.randint(0,2)
if nxSynth2_Pattern3_Vel_Dyn == 0:
    nxSynth2_Pattern3_Vel_Dyn = "nxSynth2_Pattern3 [DYN]---> Piano"
    for i in range(nxSynth2_Pattern3_Large):
        if(i%2) == 0:
            nxSynth2_Pattern3_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth2_Pattern3_Vel[i] = 0
if nxSynth2_Pattern3_Vel_Dyn == 1:
    nxSynth2_Pattern3_Vel_Dyn = "nxSynth2_Pattern3 [DYN]---> Medium"
    for i in range(nxSynth2_Pattern3_Large):
        if(i%2) == 0:
            nxSynth2_Pattern3_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth2_Pattern3_Vel[i] = 0
if nxSynth2_Pattern3_Vel_Dyn == 2:
    nxSynth2_Pattern3_Vel_Dyn = "nxSynth2_Pattern3 [DYN]---> Forte"
    for i in range(nxSynth2_Pattern3_Large):
        if(i%2) == 0:
            nxSynth2_Pattern3_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth2_Pattern3_Vel[i] = 0
nxSynth2_Pattern3_Dur = numpy.array(range(nxSynth2_Pattern3_Large))
nxSynth2_Pattern3_Dur_Dur = random.randint(0,2)
if nxSynth2_Pattern3_Dur_Dur == 0:
    nxSynth2_Pattern3_Dur_Dur = "nxSynth2_Pattern3 [DUR]---> Largo"
    for i in range(nxSynth2_Pattern3_Large):
        nxSynth2_Pattern3_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth2_Pattern3_Dur_Dur == 1:
    nxSynth2_Pattern3_Dur_Dur = "nxSynth2_Pattern3 [DUR]---> Medium"
    for i in range(nxSynth2_Pattern3_Large):
        nxSynth2_Pattern3_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth2_Pattern3_Dur_Dur == 2:
    nxSynth2_Pattern3_Dur_Dur = "nxSynth2_Pattern3 [DUR]---> Rapid"
    for i in range(nxSynth2_Pattern3_Large):
        nxSynth2_Pattern3_Dur[i] = random.choice(nxTempoMsRapid)
 
 # Pattern4-------------------------------------------------------------------
 
nxSynth2_Pattern4_Large = random.choice([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36])
nxSynth2_Pattern4_Notes = numpy.array(range(nxSynth2_Pattern4_Large))
for i in range(nxSynth2_Pattern4_Large):
    nxSynth2_Pattern4_Notes[i] = random.choice(nxRootScaleMelody2)
nxSynth2_Pattern4_Vel = numpy.array(range(nxSynth2_Pattern4_Large))
nxSynth2_Pattern4_Vel_Dyn = random.randint(0,2)
if nxSynth2_Pattern4_Vel_Dyn == 0:
    nxSynth2_Pattern4_Vel_Dyn = "nxSynth2_Pattern4 [DYN]---> Piano"
    for i in range(nxSynth2_Pattern4_Large):
        if(i%2) == 0:
            nxSynth2_Pattern4_Vel[i] = random.choice(nxVelocityPiano)
        else:
            nxSynth2_Pattern4_Vel[i] = 0
if nxSynth2_Pattern4_Vel_Dyn == 1:
    nxSynth2_Pattern4_Vel_Dyn = "nxSynth2_Pattern4 [DYN]---> Medium"
    for i in range(nxSynth2_Pattern4_Large):
        if(i%2) == 0:
            nxSynth2_Pattern4_Vel[i] = random.choice(nxVelocityMedium)
        else:
            nxSynth2_Pattern4_Vel[i] = 0
if nxSynth2_Pattern4_Vel_Dyn == 2:
    nxSynth2_Pattern4_Vel_Dyn = "nxSynth2_Pattern4 [DYN]---> Forte"
    for i in range(nxSynth2_Pattern4_Large):
        if(i%2) == 0:
            nxSynth2_Pattern4_Vel[i] = random.choice(nxVelocityForte)
        else:
            nxSynth2_Pattern4_Vel[i] = 0
nxSynth2_Pattern4_Dur = numpy.array(range(nxSynth2_Pattern4_Large))
nxSynth2_Pattern4_Dur_Dur = random.randint(0,2)
if nxSynth2_Pattern4_Dur_Dur == 0:
    nxSynth2_Pattern4_Dur_Dur = "nxSynth2_Pattern4 [DUR]---> Largo"
    for i in range(nxSynth2_Pattern4_Large):
        nxSynth2_Pattern4_Dur[i] = random.choice(nxTempoMsLargo)
if nxSynth2_Pattern4_Dur_Dur == 1:
    nxSynth2_Pattern4_Dur_Dur = "nxSynth2_Pattern4 [DUR]---> Medium"
    for i in range(nxSynth2_Pattern4_Large):
        nxSynth2_Pattern4_Dur[i] = random.choice(nxTempoMsMedium)
if nxSynth2_Pattern4_Dur_Dur == 2:
    nxSynth2_Pattern4_Dur_Dur = "nxSynth2_Pattern4 [DUR]---> Rapid"
    for i in range(nxSynth2_Pattern4_Large):
        nxSynth2_Pattern4_Dur[i] = random.choice(nxTempoMsRapid)
 
# Print
 
print "--------------------------------"
print "SCALE:"
print "nxScaleLong:", nxScaleLong
print "nxSuma:", nxSuma
print "nxSumaSum:", nxSumaSum
print "nxRootArray:", nxRootArray
print "nxScale:", nxScale
print "--------------------------------"
print "TEMPO:"
print "nxBpm:", nxBpm
print "nxTempoMs:", nxTempoMs
print "nxTempoMsLargo:", nxTempoMsLargo
print "nxTempoMsMedium:", nxTempoMsMedium
print "nxTempoMsRapid:", nxTempoMsRapid
print "--------------------------------"
print "VELOCITY:"
print "nxVelocityPiano:", nxVelocityPiano
print "nxVelocityMedium:", nxVelocityMedium
print "nxVelocityForte:", nxVelocityForte
print "--------------------------------"
print "DOWN PATTERNS:"
print "nxRootScaleSuma1:", nxRootScaleSuma1
print "nxRootScaleMelody1:", nxRootScaleMelody1
print "(Piano1)+++++++++++++++++++++++++++++++++++++++++++"
print "nxPiano1_Pattern1_Large:", nxPiano1_Pattern1_Large
print "nxPiano1_Pattern1_Notes:", nxPiano1_Pattern1_Notes
print "nxPiano1_Pattern1_Vel_Dyn:", nxPiano1_Pattern1_Vel_Dyn
print "nxPiano1_Pattern1_Vel:", nxPiano1_Pattern1_Vel
print "nxPiano1_Pattern1_Dur_Dur:", nxPiano1_Pattern1_Dur_Dur
print "nxPiano1_Pattern1_Dur:", nxPiano1_Pattern1_Dur
print "nxPiano1_Pattern2_Large:", nxPiano1_Pattern2_Large
print "nxPiano1_Pattern2_Notes:", nxPiano1_Pattern2_Notes
print "nxPiano1_Pattern2_Vel_Dyn:", nxPiano1_Pattern2_Vel_Dyn
print "nxPiano1_Pattern2_Vel:", nxPiano1_Pattern2_Vel
print "nxPiano1_Pattern2_Dur_Dur:", nxPiano1_Pattern2_Dur_Dur
print "nxPiano1_Pattern2_Dur:", nxPiano1_Pattern2_Dur
print "nxPiano1_Pattern3_Large:", nxPiano1_Pattern3_Large
print "nxPiano1_Pattern3_Notes:", nxPiano1_Pattern3_Notes
print "nxPiano1_Pattern3_Vel_Dyn:", nxPiano1_Pattern3_Vel_Dyn
print "nxPiano1_Pattern3_Vel:", nxPiano1_Pattern3_Vel
print "nxPiano1_Pattern3_Dur_Dur:", nxPiano1_Pattern3_Dur_Dur
print "nxPiano1_Pattern3_Dur:", nxPiano1_Pattern3_Dur
print "nxPiano1_Pattern4_Large:", nxPiano1_Pattern4_Large
print "nxPiano1_Pattern4_Notes:", nxPiano1_Pattern4_Notes
print "nxPiano1_Pattern4_Vel_Dyn:", nxPiano1_Pattern4_Vel_Dyn
print "nxPiano1_Pattern4_Vel:", nxPiano1_Pattern4_Vel
print "nxPiano1_Pattern4_Dur_Dur:", nxPiano1_Pattern4_Dur_Dur
print "nxPiano1_Pattern4_Dur:", nxPiano1_Pattern4_Dur
print "(Synth1)+++++++++++++++++++++++++++++++++++++++++++"
print "nxSynth1_Pattern1_Large:", nxSynth1_Pattern1_Large
print "nxSynth1_Pattern1_Notes:", nxSynth1_Pattern1_Notes
print "nxSynth1_Pattern1_Vel_Dyn:", nxSynth1_Pattern1_Vel_Dyn
print "nxSynth1_Pattern1_Vel:", nxSynth1_Pattern1_Vel
print "nxSynth1_Pattern1_Dur_Dur:", nxSynth1_Pattern1_Dur_Dur
print "nxSynth1_Pattern1_Dur:", nxSynth1_Pattern1_Dur
print "nxSynth1_Pattern2_Large:", nxSynth1_Pattern2_Large
print "nxSynth1_Pattern2_Notes:", nxSynth1_Pattern2_Notes
print "nxSynth1_Pattern2_Vel_Dyn:", nxSynth1_Pattern2_Vel_Dyn
print "nxSynth1_Pattern2_Vel:", nxSynth1_Pattern2_Vel
print "nxSynth1_Pattern2_Dur_Dur:", nxSynth1_Pattern2_Dur_Dur
print "nxSynth1_Pattern2_Dur:", nxSynth1_Pattern2_Dur
print "nxSynth1_Pattern3_Large:", nxSynth1_Pattern3_Large
print "nxSynth1_Pattern3_Notes:", nxSynth1_Pattern3_Notes
print "nxSynth1_Pattern3_Vel_Dyn:", nxSynth1_Pattern3_Vel_Dyn
print "nxSynth1_Pattern3_Vel:", nxSynth1_Pattern3_Vel
print "nxSynth1_Pattern3_Dur_Dur:", nxSynth1_Pattern3_Dur_Dur
print "nxSynth1_Pattern3_Dur:", nxSynth1_Pattern3_Dur
print "nxSynth1_Pattern4_Large:", nxSynth1_Pattern4_Large
print "nxSynth1_Pattern4_Notes:", nxSynth1_Pattern4_Notes
print "nxSynth1_Pattern4_Vel_Dyn:", nxSynth1_Pattern4_Vel_Dyn
print "nxSynth1_Pattern4_Vel:", nxSynth1_Pattern4_Vel
print "nxSynth1_Pattern4_Dur_Dur:", nxSynth1_Pattern4_Dur_Dur
print "nxSynth1_Pattern4_Dur:", nxSynth1_Pattern4_Dur
print "UP PATTERNS:"
print "nxRootScaleSuma2:", nxRootScaleSuma2
print "nxRootScaleMelody2:", nxRootScaleMelody2
print "(Piano2)+++++++++++++++++++++++++++++++++++++++++++"
print "nxPiano2_Pattern1_Large:", nxPiano2_Pattern1_Large
print "nxPiano2_Pattern1_Notes:", nxPiano2_Pattern1_Notes
print "nxPiano2_Pattern1_Vel_Dyn:", nxPiano2_Pattern1_Vel_Dyn
print "nxPiano2_Pattern1_Vel:", nxPiano2_Pattern1_Vel
print "nxPiano2_Pattern1_Dur_Dur:", nxPiano2_Pattern1_Dur_Dur
print "nxPiano2_Pattern1_Dur:", nxPiano2_Pattern1_Dur
print "nxPiano2_Pattern2_Large:", nxPiano2_Pattern2_Large
print "nxPiano2_Pattern2_Notes:", nxPiano2_Pattern2_Notes
print "nxPiano2_Pattern2_Vel_Dyn:", nxPiano2_Pattern2_Vel_Dyn
print "nxPiano2_Pattern2_Vel:", nxPiano2_Pattern2_Vel
print "nxPiano2_Pattern2_Dur_Dur:", nxPiano2_Pattern2_Dur_Dur
print "nxPiano2_Pattern2_Dur:", nxPiano2_Pattern2_Dur
print "nxPiano2_Pattern3_Large:", nxPiano2_Pattern3_Large
print "nxPiano2_Pattern3_Notes:", nxPiano2_Pattern3_Notes
print "nxPiano2_Pattern3_Vel_Dyn:", nxPiano2_Pattern3_Vel_Dyn
print "nxPiano2_Pattern3_Vel:", nxPiano2_Pattern3_Vel
print "nxPiano2_Pattern3_Dur_Dur:", nxPiano2_Pattern3_Dur_Dur
print "nxPiano2_Pattern3_Dur:", nxPiano2_Pattern3_Dur
print "nxPiano2_Pattern4_Large:", nxPiano2_Pattern4_Large
print "nxPiano2_Pattern4_Notes:", nxPiano2_Pattern4_Notes
print "nxPiano2_Pattern4_Vel_Dyn:", nxPiano2_Pattern4_Vel_Dyn
print "nxPiano2_Pattern4_Vel:", nxPiano2_Pattern4_Vel
print "nxPiano2_Pattern4_Dur_Dur:", nxPiano2_Pattern4_Dur_Dur
print "nxPiano2_Pattern4_Dur:", nxPiano2_Pattern4_Dur
print "(Synth2)+++++++++++++++++++++++++++++++++++++++++++"
print "nxSynth2_Pattern1_Large:", nxSynth2_Pattern1_Large
print "nxSynth2_Pattern1_Notes:", nxSynth2_Pattern1_Notes
print "nxSynth2_Pattern1_Vel_Dyn:", nxSynth2_Pattern1_Vel_Dyn
print "nxSynth2_Pattern1_Vel:", nxSynth2_Pattern1_Vel
print "nxSynth2_Pattern1_Dur_Dur:", nxSynth2_Pattern1_Dur_Dur
print "nxSynth2_Pattern1_Dur:", nxSynth2_Pattern1_Dur
print "nxSynth2_Pattern2_Large:", nxSynth2_Pattern2_Large
print "nxSynth2_Pattern2_Notes:", nxSynth2_Pattern2_Notes
print "nxSynth2_Pattern2_Vel_Dyn:", nxSynth2_Pattern2_Vel_Dyn
print "nxSynth2_Pattern2_Vel:", nxSynth2_Pattern2_Vel
print "nxSynth2_Pattern2_Dur_Dur:", nxSynth2_Pattern2_Dur_Dur
print "nxSynth2_Pattern2_Dur:", nxSynth2_Pattern2_Dur
print "nxSynth2_Pattern3_Large:", nxSynth2_Pattern3_Large
print "nxSynth2_Pattern3_Notes:", nxSynth2_Pattern3_Notes
print "nxSynth2_Pattern3_Vel_Dyn:", nxSynth2_Pattern3_Vel_Dyn
print "nxSynth2_Pattern3_Vel:", nxSynth2_Pattern3_Vel
print "nxSynth2_Pattern3_Dur_Dur:", nxSynth2_Pattern3_Dur_Dur
print "nxSynth2_Pattern3_Dur:", nxSynth2_Pattern3_Dur
print "nxSynth2_Pattern4_Large:", nxSynth2_Pattern4_Large
print "nxSynth2_Pattern4_Notes:", nxSynth2_Pattern4_Notes
print "nxSynth2_Pattern4_Vel_Dyn:", nxSynth2_Pattern4_Vel_Dyn
print "nxSynth2_Pattern4_Vel:", nxSynth2_Pattern4_Vel
print "nxSynth2_Pattern4_Dur_Dur:", nxSynth2_Pattern4_Dur_Dur
print "nxSynth2_Pattern4_Dur:", nxSynth2_Pattern4_Dur
 
print "++++++++++++++++++++++++++++++++++++++++++++++++++++++"
print "RAPID REFERENCE+++++++++++++++++++++++++++++++++++++++"
print ""
print "Piano 1:"
print "Pattern 1         [NUM]--->", nxPiano1_Pattern1_Large 
print  nxPiano1_Pattern1_Vel_Dyn
print  nxPiano1_Pattern1_Dur_Dur
print "Pattern 2         [NUM]--->", nxPiano1_Pattern2_Large
print  nxPiano1_Pattern2_Vel_Dyn
print  nxPiano1_Pattern2_Dur_Dur
print "Pattern 3         [NUM]--->", nxPiano1_Pattern3_Large
print  nxPiano1_Pattern3_Vel_Dyn
print  nxPiano1_Pattern3_Dur_Dur
print "Pattern 4         [NUM]--->", nxPiano1_Pattern4_Large
print  nxPiano1_Pattern4_Vel_Dyn
print  nxPiano1_Pattern4_Dur_Dur
print "Synth 1:"
print "Pattern 1         [NUM]--->", nxSynth1_Pattern1_Large 
print  nxSynth1_Pattern1_Vel_Dyn
print  nxSynth1_Pattern1_Dur_Dur
print "Pattern 2         [NUM]--->", nxSynth1_Pattern2_Large
print  nxSynth1_Pattern2_Vel_Dyn
print  nxSynth1_Pattern2_Dur_Dur
print "Pattern 3         [NUM]--->", nxSynth1_Pattern3_Large
print  nxSynth1_Pattern3_Vel_Dyn
print  nxSynth1_Pattern3_Dur_Dur
print "Pattern 4         [NUM]--->", nxSynth1_Pattern4_Large
print  nxSynth1_Pattern4_Vel_Dyn
print  nxSynth1_Pattern4_Dur_Dur
print ""
print "Piano 2:"
print "Pattern 1         [NUM]--->", nxPiano2_Pattern1_Large 
print  nxPiano2_Pattern1_Vel_Dyn
print  nxPiano2_Pattern1_Dur_Dur
print "Pattern 2         [NUM]--->", nxPiano2_Pattern2_Large
print  nxPiano2_Pattern2_Vel_Dyn
print  nxPiano2_Pattern2_Dur_Dur
print "Pattern 3         [NUM]--->", nxPiano2_Pattern3_Large
print  nxPiano2_Pattern3_Vel_Dyn
print  nxPiano2_Pattern3_Dur_Dur
print "Pattern 4         [NUM]--->", nxPiano2_Pattern4_Large
print  nxPiano2_Pattern4_Vel_Dyn
print  nxPiano2_Pattern4_Dur_Dur
print "Synth 2:"
print "Pattern 1         [NUM]--->", nxSynth2_Pattern1_Large 
print  nxSynth2_Pattern1_Vel_Dyn
print  nxSynth2_Pattern1_Dur_Dur
print "Pattern 2         [NUM]--->", nxSynth2_Pattern2_Large
print  nxSynth2_Pattern2_Vel_Dyn
print  nxSynth2_Pattern2_Dur_Dur
print "Pattern 3         [NUM]--->", nxSynth2_Pattern3_Large
print  nxSynth2_Pattern3_Vel_Dyn
print  nxSynth2_Pattern3_Dur_Dur
print "Pattern 4         [NUM]--->", nxSynth2_Pattern4_Large
print  nxSynth2_Pattern4_Vel_Dyn
print  nxSynth2_Pattern4_Dur_Dur
print "++++++++++++++++++++++++++++++++++++++++++++++++++++++"
 
# Send to a file:
 
nxPatternsFile = open("%s/nxInstrument008_PatternsFile.txt" %(pathname), "w")
 
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern1_Large))
nxPiano1_Pattern1_Notes = str(nxPiano1_Pattern1_Notes)
lennxPiano1_Pattern = len(nxPiano1_Pattern1_Notes) - 1
nxPiano1_Pattern1_Notes = nxPiano1_Pattern1_Notes[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern1_Notes))
nxPiano1_Pattern1_Vel = str(nxPiano1_Pattern1_Vel)
lennxPiano1_Pattern = len(nxPiano1_Pattern1_Vel) - 1
nxPiano1_Pattern1_Vel = nxPiano1_Pattern1_Vel[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern1_Vel))
nxPiano1_Pattern1_Dur = str(nxPiano1_Pattern1_Dur)
lennxPiano1_Pattern = len(nxPiano1_Pattern1_Dur) - 1
nxPiano1_Pattern1_Dur = nxPiano1_Pattern1_Dur[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern1_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern2_Large))
nxPiano1_Pattern2_Notes = str(nxPiano1_Pattern2_Notes)
lennxPiano1_Pattern = len(nxPiano1_Pattern2_Notes) - 1
nxPiano1_Pattern2_Notes = nxPiano1_Pattern2_Notes[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern2_Notes))
nxPiano1_Pattern2_Vel = str(nxPiano1_Pattern2_Vel)
lennxPiano1_Pattern = len(nxPiano1_Pattern2_Vel) - 1
nxPiano1_Pattern2_Vel = nxPiano1_Pattern2_Vel[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern2_Vel))
nxPiano1_Pattern2_Dur = str(nxPiano1_Pattern2_Dur)
lennxPiano1_Pattern = len(nxPiano1_Pattern2_Dur) - 1
nxPiano1_Pattern2_Dur = nxPiano1_Pattern2_Dur[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern2_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern3_Large))
nxPiano1_Pattern3_Notes = str(nxPiano1_Pattern3_Notes)
lennxPiano1_Pattern = len(nxPiano1_Pattern3_Notes) - 1
nxPiano1_Pattern3_Notes = nxPiano1_Pattern3_Notes[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern3_Notes))
nxPiano1_Pattern3_Vel = str(nxPiano1_Pattern3_Vel)
lennxPiano1_Pattern = len(nxPiano1_Pattern3_Vel) - 1
nxPiano1_Pattern3_Vel = nxPiano1_Pattern3_Vel[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern3_Vel))
nxPiano1_Pattern3_Dur = str(nxPiano1_Pattern3_Dur)
lennxPiano1_Pattern = len(nxPiano1_Pattern3_Dur) - 1
nxPiano1_Pattern3_Dur = nxPiano1_Pattern3_Dur[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern3_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern4_Large))
nxPiano1_Pattern4_Notes = str(nxPiano1_Pattern4_Notes)
lennxPiano1_Pattern = len(nxPiano1_Pattern4_Notes) - 1
nxPiano1_Pattern4_Notes = nxPiano1_Pattern4_Notes[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern4_Notes))
nxPiano1_Pattern4_Vel = str(nxPiano1_Pattern4_Vel)
lennxPiano1_Pattern = len(nxPiano1_Pattern4_Vel) - 1
nxPiano1_Pattern4_Vel = nxPiano1_Pattern4_Vel[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern4_Vel))
nxPiano1_Pattern4_Dur = str(nxPiano1_Pattern4_Dur)
lennxPiano1_Pattern = len(nxPiano1_Pattern4_Dur) - 1
nxPiano1_Pattern4_Dur = nxPiano1_Pattern4_Dur[1:lennxPiano1_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano1_Pattern4_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern1_Large))
nxSynth1_Pattern1_Notes = str(nxSynth1_Pattern1_Notes)
lennxSynth1_Pattern = len(nxSynth1_Pattern1_Notes) - 1
nxSynth1_Pattern1_Notes = nxSynth1_Pattern1_Notes[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern1_Notes))
nxSynth1_Pattern1_Vel = str(nxSynth1_Pattern1_Vel)
lennxSynth1_Pattern = len(nxSynth1_Pattern1_Vel) - 1
nxSynth1_Pattern1_Vel = nxSynth1_Pattern1_Vel[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern1_Vel))
nxSynth1_Pattern1_Dur = str(nxSynth1_Pattern1_Dur)
lennxSynth1_Pattern = len(nxSynth1_Pattern1_Dur) - 1
nxSynth1_Pattern1_Dur = nxSynth1_Pattern1_Dur[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern1_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern2_Large))
nxSynth1_Pattern2_Notes = str(nxSynth1_Pattern2_Notes)
lennxSynth1_Pattern = len(nxSynth1_Pattern2_Notes) - 1
nxSynth1_Pattern2_Notes = nxSynth1_Pattern2_Notes[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern2_Notes))
nxSynth1_Pattern2_Vel = str(nxSynth1_Pattern2_Vel)
lennxSynth1_Pattern = len(nxSynth1_Pattern2_Vel) - 1
nxSynth1_Pattern2_Vel = nxSynth1_Pattern2_Vel[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern2_Vel))
nxSynth1_Pattern2_Dur = str(nxSynth1_Pattern2_Dur)
lennxSynth1_Pattern = len(nxSynth1_Pattern2_Dur) - 1
nxSynth1_Pattern2_Dur = nxSynth1_Pattern2_Dur[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern2_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern3_Large))
nxSynth1_Pattern3_Notes = str(nxSynth1_Pattern3_Notes)
lennxSynth1_Pattern = len(nxSynth1_Pattern3_Notes) - 1
nxSynth1_Pattern3_Notes = nxSynth1_Pattern3_Notes[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern3_Notes))
nxSynth1_Pattern3_Vel = str(nxSynth1_Pattern3_Vel)
lennxSynth1_Pattern = len(nxSynth1_Pattern3_Vel) - 1
nxSynth1_Pattern3_Vel = nxSynth1_Pattern3_Vel[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern3_Vel))
nxSynth1_Pattern3_Dur = str(nxSynth1_Pattern3_Dur)
lennxSynth1_Pattern = len(nxSynth1_Pattern3_Dur) - 1
nxSynth1_Pattern3_Dur = nxSynth1_Pattern3_Dur[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern3_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern4_Large))
nxSynth1_Pattern4_Notes = str(nxSynth1_Pattern4_Notes)
lennxSynth1_Pattern = len(nxSynth1_Pattern4_Notes) - 1
nxSynth1_Pattern4_Notes = nxSynth1_Pattern4_Notes[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern4_Notes))
nxSynth1_Pattern4_Vel = str(nxSynth1_Pattern4_Vel)
lennxSynth1_Pattern = len(nxSynth1_Pattern4_Vel) - 1
nxSynth1_Pattern4_Vel = nxSynth1_Pattern4_Vel[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern4_Vel))
nxSynth1_Pattern4_Dur = str(nxSynth1_Pattern4_Dur)
lennxSynth1_Pattern = len(nxSynth1_Pattern4_Dur) - 1
nxSynth1_Pattern4_Dur = nxSynth1_Pattern4_Dur[1:lennxSynth1_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth1_Pattern4_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern1_Large))
nxPiano2_Pattern1_Notes = str(nxPiano2_Pattern1_Notes)
lennxPiano2_Pattern = len(nxPiano2_Pattern1_Notes) - 1
nxPiano2_Pattern1_Notes = nxPiano2_Pattern1_Notes[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern1_Notes))
nxPiano2_Pattern1_Vel = str(nxPiano2_Pattern1_Vel)
lennxPiano2_Pattern = len(nxPiano2_Pattern1_Vel) - 1
nxPiano2_Pattern1_Vel = nxPiano2_Pattern1_Vel[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern1_Vel))
nxPiano2_Pattern1_Dur = str(nxPiano2_Pattern1_Dur)
lennxPiano2_Pattern = len(nxPiano2_Pattern1_Dur) - 1
nxPiano2_Pattern1_Dur = nxPiano2_Pattern1_Dur[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern1_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern2_Large))
nxPiano2_Pattern2_Notes = str(nxPiano2_Pattern2_Notes)
lennxPiano2_Pattern = len(nxPiano2_Pattern2_Notes) - 1
nxPiano2_Pattern2_Notes = nxPiano2_Pattern2_Notes[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern2_Notes))
nxPiano2_Pattern2_Vel = str(nxPiano2_Pattern2_Vel)
lennxPiano2_Pattern = len(nxPiano2_Pattern2_Vel) - 1
nxPiano2_Pattern2_Vel = nxPiano2_Pattern2_Vel[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern2_Vel))
nxPiano2_Pattern2_Dur = str(nxPiano2_Pattern2_Dur)
lennxPiano2_Pattern = len(nxPiano2_Pattern2_Dur) - 1
nxPiano2_Pattern2_Dur = nxPiano2_Pattern2_Dur[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern2_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern3_Large))
nxPiano2_Pattern3_Notes = str(nxPiano2_Pattern3_Notes)
lennxPiano2_Pattern = len(nxPiano2_Pattern3_Notes) - 1
nxPiano2_Pattern3_Notes = nxPiano2_Pattern3_Notes[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern3_Notes))
nxPiano2_Pattern3_Vel = str(nxPiano2_Pattern3_Vel)
lennxPiano2_Pattern = len(nxPiano2_Pattern3_Vel) - 1
nxPiano2_Pattern3_Vel = nxPiano2_Pattern3_Vel[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern3_Vel))
nxPiano2_Pattern3_Dur = str(nxPiano2_Pattern3_Dur)
lennxPiano2_Pattern = len(nxPiano2_Pattern3_Dur) - 1
nxPiano2_Pattern3_Dur = nxPiano2_Pattern3_Dur[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern3_Dur))
 
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern4_Large))
nxPiano2_Pattern4_Notes = str(nxPiano2_Pattern4_Notes)
lennxPiano2_Pattern = len(nxPiano2_Pattern4_Notes) - 1
nxPiano2_Pattern4_Notes = nxPiano2_Pattern4_Notes[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern4_Notes))
nxPiano2_Pattern4_Vel = str(nxPiano2_Pattern4_Vel)
lennxPiano2_Pattern = len(nxPiano2_Pattern4_Vel) - 1
nxPiano2_Pattern4_Vel = nxPiano2_Pattern4_Vel[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern4_Vel))
nxPiano2_Pattern4_Dur = str(nxPiano2_Pattern4_Dur)
lennxPiano2_Pattern = len(nxPiano2_Pattern4_Dur) - 1
nxPiano2_Pattern4_Dur = nxPiano2_Pattern4_Dur[1:lennxPiano2_Pattern]
nxPatternsFile.write("%s;\n" %(nxPiano2_Pattern4_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern1_Large))
nxSynth2_Pattern1_Notes = str(nxSynth2_Pattern1_Notes)
lennxSynth2_Pattern = len(nxSynth2_Pattern1_Notes) - 1
nxSynth2_Pattern1_Notes = nxSynth2_Pattern1_Notes[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern1_Notes))
nxSynth2_Pattern1_Vel = str(nxSynth2_Pattern1_Vel)
lennxSynth2_Pattern = len(nxSynth2_Pattern1_Vel) - 1
nxSynth2_Pattern1_Vel = nxSynth2_Pattern1_Vel[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern1_Vel))
nxSynth2_Pattern1_Dur = str(nxSynth2_Pattern1_Dur)
lennxSynth2_Pattern = len(nxSynth2_Pattern1_Dur) - 1
nxSynth2_Pattern1_Dur = nxSynth2_Pattern1_Dur[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern1_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern2_Large))
nxSynth2_Pattern2_Notes = str(nxSynth2_Pattern2_Notes)
lennxSynth2_Pattern = len(nxSynth2_Pattern2_Notes) - 1
nxSynth2_Pattern2_Notes = nxSynth2_Pattern2_Notes[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern2_Notes))
nxSynth2_Pattern2_Vel = str(nxSynth2_Pattern2_Vel)
lennxSynth2_Pattern = len(nxSynth2_Pattern2_Vel) - 1
nxSynth2_Pattern2_Vel = nxSynth2_Pattern2_Vel[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern2_Vel))
nxSynth2_Pattern2_Dur = str(nxSynth2_Pattern2_Dur)
lennxSynth2_Pattern = len(nxSynth2_Pattern2_Dur) - 1
nxSynth2_Pattern2_Dur = nxSynth2_Pattern2_Dur[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern2_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern3_Large))
nxSynth2_Pattern3_Notes = str(nxSynth2_Pattern3_Notes)
lennxSynth2_Pattern = len(nxSynth2_Pattern3_Notes) - 1
nxSynth2_Pattern3_Notes = nxSynth2_Pattern3_Notes[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern3_Notes))
nxSynth2_Pattern3_Vel = str(nxSynth2_Pattern3_Vel)
lennxSynth2_Pattern = len(nxSynth2_Pattern3_Vel) - 1
nxSynth2_Pattern3_Vel = nxSynth2_Pattern3_Vel[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern3_Vel))
nxSynth2_Pattern3_Dur = str(nxSynth2_Pattern3_Dur)
lennxSynth2_Pattern = len(nxSynth2_Pattern3_Dur) - 1
nxSynth2_Pattern3_Dur = nxSynth2_Pattern3_Dur[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern3_Dur))
 
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern4_Large))
nxSynth2_Pattern4_Notes = str(nxSynth2_Pattern4_Notes)
lennxSynth2_Pattern = len(nxSynth2_Pattern4_Notes) - 1
nxSynth2_Pattern4_Notes = nxSynth2_Pattern4_Notes[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern4_Notes))
nxSynth2_Pattern4_Vel = str(nxSynth2_Pattern4_Vel)
lennxSynth2_Pattern = len(nxSynth2_Pattern4_Vel) - 1
nxSynth2_Pattern4_Vel = nxSynth2_Pattern4_Vel[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern4_Vel))
nxSynth2_Pattern4_Dur = str(nxSynth2_Pattern4_Dur)
lennxSynth2_Pattern = len(nxSynth2_Pattern4_Dur) - 1
nxSynth2_Pattern4_Dur = nxSynth2_Pattern4_Dur[1:lennxSynth2_Pattern]
nxPatternsFile.write("%s;\n" %(nxSynth2_Pattern4_Dur))
 
nxPatternsFile.close()
 
time.sleep(6)
 
subprocess.Popen("sudo aconnect 28:0 129:0", shell="True")
 
time.sleep(1)
 
subprocess.Popen("sudo aconnect 129:2 24:0", shell="True")

PureData Code:

#N canvas 384 170 546 432 10;
#N canvas 209 411 232 219 nx008Sub 0;
#N canvas 0 25 1016 657 nxPiano1 0;
#X obj 42 118 metroplus 125 125 125 125 125 125 125 125 125 125 125
125;
#X obj 42 87 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 42 210 5 0 0 0 - - -;
#X msg 70 86 stop;
#X obj 42 59 select 1 0;
#X obj 42 180 counter 36;
#X obj 42 249 select 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36;
#N canvas 0 25 1016 657 nxPiano1_PatternLen 0;
#X obj 184 318 textfile;
#X msg 126 255 rewind;
#X obj 184 256 loadbang;
#X obj 126 211 loadbang;
#X msg 278 233 bang;
#X floatatom 278 202 5 0 0 0 - - -;
#X msg 278 120 bang;
#X msg 321 119 stop;
#X obj 347 147 - 1;
#X obj 126 234 delay 1;
#X obj 278 172 counter 0 1524;
#X msg 359 119 bang;
#X obj 278 145 metro 1;
#X obj 278 91 delay 1;
#X floatatom 184 445 5 0 0 0 - - -;
#X msg 184 281 read nxInstrument008_PatternsFile.txt;
#X obj 184 397 unpack 0;
#X obj 184 486 outlet;
#X obj 278 -22 r Piano1_Pattern1;
#X obj 278 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 278 33 1;
#X floatatom 278 63 5 0 0 0 - - -;
#X obj 389 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 389 -22 r Piano1_Pattern2;
#X obj 498 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 498 -22 r Piano1_Pattern3;
#X obj 608 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 608 -22 r Piano1_Pattern4;
#X msg 389 33 5;
#X msg 498 33 9;
#X msg 608 33 13;
#X connect 0 0 16 0;
#X connect 1 0 0 0;
#X connect 2 0 15 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 17 0;
#X connect 15 0 0 0;
#X connect 16 0 14 0;
#X connect 18 0 19 0;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 21 0 8 0;
#X connect 21 0 13 0;
#X connect 21 0 1 0;
#X connect 22 0 28 0;
#X connect 23 0 22 0;
#X connect 24 0 29 0;
#X connect 25 0 24 0;
#X connect 26 0 30 0;
#X connect 27 0 26 0;
#X connect 28 0 21 0;
#X connect 29 0 21 0;
#X connect 30 0 21 0;
#X restore 119 139 pd nxPiano1_PatternLen;
#X obj 42 7 r Piano1_ONOFF;
#X floatatom 42 32 5 0 0 0 - - -;
#X floatatom 119 164 5 0 0 0 - - -;
#N canvas 0 25 1016 657 nxPiano1_PatternDur 0;
#X obj 184 318 textfile;
#X msg 126 255 rewind;
#X obj 184 256 loadbang;
#X obj 126 211 loadbang;
#X msg 278 233 bang;
#X floatatom 278 202 5 0 0 0 - - -;
#X msg 278 120 bang;
#X msg 321 119 stop;
#X obj 347 147 - 1;
#X obj 126 234 delay 1;
#X obj 278 172 counter 0 1524;
#X msg 359 119 bang;
#X obj 278 145 metro 1;
#X obj 278 91 delay 1;
#X msg 184 281 read nxInstrument008_PatternsFile.txt;
#X obj 184 353 outlet;
#X obj 278 -22 r Piano1_Pattern1;
#X obj 278 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 278 63 5 0 0 0 - - -;
#X obj 389 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 389 -22 r Piano1_Pattern2;
#X obj 498 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 498 -22 r Piano1_Pattern3;
#X obj 608 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 608 -22 r Piano1_Pattern4;
#X msg 278 33 4;
#X msg 389 33 8;
#X msg 498 33 12;
#X msg 608 33 16;
#X connect 0 0 15 0;
#X connect 1 0 0 0;
#X connect 2 0 14 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 0 0;
#X connect 16 0 17 0;
#X connect 17 0 25 0;
#X connect 18 0 8 0;
#X connect 18 0 13 0;
#X connect 18 0 1 0;
#X connect 19 0 26 0;
#X connect 20 0 19 0;
#X connect 21 0 27 0;
#X connect 22 0 21 0;
#X connect 23 0 28 0;
#X connect 24 0 23 0;
#X connect 25 0 18 0;
#X connect 26 0 18 0;
#X connect 27 0 18 0;
#X connect 28 0 18 0;
#X restore 381 85 pd nxPiano1_PatternDur;
#N canvas 0 25 1024 639 nxPiano1_PatternVelocity------------------------------------
0;
#X obj 848 414 textfile;
#X msg 696 252 rewind;
#X obj 754 253 loadbang;
#X obj 696 208 loadbang;
#X msg 848 339 bang;
#X floatatom 848 308 5 0 0 0 - - -;
#X msg 848 226 bang;
#X msg 891 225 stop;
#X obj 917 253 - 1;
#X obj 696 231 delay 1;
#X obj 848 278 counter 0 1524;
#X msg 929 225 bang;
#X obj 848 251 metro 1;
#X obj 848 197 delay 1;
#X msg 848 377 read nxInstrument008_PatternsFile.txt;
#X obj 518 -10 r Piano1_Pattern1;
#X obj 518 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 848 169 5 0 0 0 - - -;
#X obj 629 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 629 -10 r Piano1_Pattern2;
#X obj 738 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 738 -10 r Piano1_Pattern3;
#X obj 848 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 848 -10 r Piano1_Pattern4;
#X floatatom 36 424 5 0 0 0 - - -;
#X obj 9 458 float;
#X floatatom 73 424 5 0 0 0 - - -;
#X obj 46 458 float;
#X floatatom 110 424 5 0 0 0 - - -;
#X obj 83 458 float;
#X floatatom 147 424 5 0 0 0 - - -;
#X obj 120 458 float;
#X floatatom 186 424 5 0 0 0 - - -;
#X obj 159 458 float;
#X floatatom 223 424 5 0 0 0 - - -;
#X obj 196 458 float;
#X floatatom 260 424 5 0 0 0 - - -;
#X obj 233 458 float;
#X floatatom 297 424 5 0 0 0 - - -;
#X obj 270 458 float;
#X floatatom 336 423 5 0 0 0 - - -;
#X obj 309 457 float;
#X floatatom 373 423 5 0 0 0 - - -;
#X obj 346 457 float;
#X floatatom 410 423 5 0 0 0 - - -;
#X obj 383 457 float;
#X floatatom 447 423 5 0 0 0 - - -;
#X obj 420 457 float;
#X obj 9 597 outlet;
#X obj 8 5 inlet;
#X obj 49 5 inlet;
#X obj 88 5 inlet;
#X obj 129 5 inlet;
#X obj 167 5 inlet;
#X obj 208 5 inlet;
#X obj 247 5 inlet;
#X obj 288 5 inlet;
#X obj 328 5 inlet;
#X obj 369 5 inlet;
#X obj 408 5 inlet;
#X obj 447 5 inlet;
#X obj 446 289 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0;
#X obj 515 96 inlet;
#X obj 556 96 inlet;
#X obj 595 96 inlet;
#X obj 636 96 inlet;
#X obj 674 96 inlet;
#X obj 715 96 inlet;
#X obj 754 96 inlet;
#X obj 795 96 inlet;
#X obj 835 96 inlet;
#X obj 876 96 inlet;
#X obj 915 96 inlet;
#X obj 954 96 inlet;
#X obj 993 95 inlet;
#X obj 1034 95 inlet;
#X obj 1073 95 inlet;
#X obj 1114 95 inlet;
#X obj 1152 95 inlet;
#X obj 1193 95 inlet;
#X obj 1232 95 inlet;
#X obj 1273 95 inlet;
#X obj 1313 95 inlet;
#X obj 1354 95 inlet;
#X obj 1393 95 inlet;
#X obj 1432 95 inlet;
#X floatatom 152 486 5 0 0 0 - - -;
#X obj 125 520 float;
#X floatatom 189 486 5 0 0 0 - - -;
#X obj 162 520 float;
#X floatatom 226 486 5 0 0 0 - - -;
#X obj 199 520 float;
#X floatatom 263 486 5 0 0 0 - - -;
#X obj 236 520 float;
#X floatatom 302 486 5 0 0 0 - - -;
#X obj 275 520 float;
#X floatatom 339 486 5 0 0 0 - - -;
#X obj 312 520 float;
#X floatatom 376 486 5 0 0 0 - - -;
#X obj 349 520 float;
#X floatatom 413 486 5 0 0 0 - - -;
#X obj 386 520 float;
#X floatatom 452 485 5 0 0 0 - - -;
#X obj 425 519 float;
#X floatatom 489 485 5 0 0 0 - - -;
#X obj 462 519 float;
#X floatatom 526 485 5 0 0 0 - - -;
#X obj 499 519 float;
#X floatatom 563 485 5 0 0 0 - - -;
#X obj 536 519 float;
#X floatatom 258 552 5 0 0 0 - - -;
#X obj 231 586 float;
#X floatatom 295 552 5 0 0 0 - - -;
#X obj 268 586 float;
#X floatatom 332 552 5 0 0 0 - - -;
#X obj 305 586 float;
#X floatatom 369 552 5 0 0 0 - - -;
#X obj 342 586 float;
#X floatatom 408 552 5 0 0 0 - - -;
#X obj 381 586 float;
#X floatatom 445 552 5 0 0 0 - - -;
#X obj 418 586 float;
#X floatatom 482 552 5 0 0 0 - - -;
#X obj 455 586 float;
#X floatatom 519 552 5 0 0 0 - - -;
#X obj 492 586 float;
#X floatatom 558 551 5 0 0 0 - - -;
#X obj 531 585 float;
#X floatatom 595 551 5 0 0 0 - - -;
#X obj 568 585 float;
#X floatatom 632 551 5 0 0 0 - - -;
#X obj 605 585 float;
#X floatatom 669 551 5 0 0 0 - - -;
#X obj 642 585 float;
#X msg 518 45 3;
#X msg 629 45 7;
#X msg 738 45 11;
#X msg 848 45 15;
#X connect 0 0 61 0;
#X connect 1 0 0 0;
#X connect 2 0 14 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 0 0;
#X connect 15 0 16 0;
#X connect 16 0 134 0;
#X connect 17 0 8 0;
#X connect 17 0 13 0;
#X connect 17 0 1 0;
#X connect 18 0 135 0;
#X connect 19 0 18 0;
#X connect 20 0 136 0;
#X connect 21 0 20 0;
#X connect 22 0 137 0;
#X connect 23 0 22 0;
#X connect 24 0 25 1;
#X connect 25 0 48 0;
#X connect 26 0 27 1;
#X connect 27 0 48 0;
#X connect 28 0 29 1;
#X connect 29 0 48 0;
#X connect 30 0 31 1;
#X connect 31 0 48 0;
#X connect 32 0 33 1;
#X connect 33 0 48 0;
#X connect 34 0 35 1;
#X connect 35 0 48 0;
#X connect 36 0 37 1;
#X connect 37 0 48 0;
#X connect 38 0 39 1;
#X connect 39 0 48 0;
#X connect 40 0 41 1;
#X connect 41 0 48 0;
#X connect 42 0 43 1;
#X connect 43 0 48 0;
#X connect 44 0 45 1;
#X connect 45 0 48 0;
#X connect 46 0 47 1;
#X connect 47 0 48 0;
#X connect 49 0 25 0;
#X connect 50 0 27 0;
#X connect 51 0 29 0;
#X connect 52 0 31 0;
#X connect 53 0 33 0;
#X connect 54 0 35 0;
#X connect 55 0 37 0;
#X connect 56 0 39 0;
#X connect 57 0 41 0;
#X connect 58 0 43 0;
#X connect 59 0 45 0;
#X connect 60 0 47 0;
#X connect 61 0 24 0;
#X connect 61 1 26 0;
#X connect 61 2 28 0;
#X connect 61 3 30 0;
#X connect 61 4 32 0;
#X connect 61 5 34 0;
#X connect 61 6 36 0;
#X connect 61 7 38 0;
#X connect 61 8 40 0;
#X connect 61 9 42 0;
#X connect 61 10 44 0;
#X connect 61 11 46 0;
#X connect 61 12 86 0;
#X connect 61 13 88 0;
#X connect 61 14 90 0;
#X connect 61 15 92 0;
#X connect 61 16 94 0;
#X connect 61 17 96 0;
#X connect 61 18 98 0;
#X connect 61 19 100 0;
#X connect 61 20 102 0;
#X connect 61 21 104 0;
#X connect 61 22 106 0;
#X connect 61 23 108 0;
#X connect 61 24 110 0;
#X connect 61 25 112 0;
#X connect 61 26 114 0;
#X connect 61 27 116 0;
#X connect 61 28 118 0;
#X connect 61 29 120 0;
#X connect 61 30 122 0;
#X connect 61 31 124 0;
#X connect 61 32 126 0;
#X connect 61 33 128 0;
#X connect 61 34 130 0;
#X connect 61 35 132 0;
#X connect 62 0 87 0;
#X connect 63 0 89 0;
#X connect 64 0 91 0;
#X connect 65 0 93 0;
#X connect 66 0 95 0;
#X connect 67 0 97 0;
#X connect 68 0 99 0;
#X connect 69 0 101 0;
#X connect 70 0 103 0;
#X connect 71 0 105 0;
#X connect 72 0 107 0;
#X connect 73 0 109 0;
#X connect 74 0 111 0;
#X connect 75 0 113 0;
#X connect 76 0 115 0;
#X connect 77 0 117 0;
#X connect 78 0 119 0;
#X connect 79 0 121 0;
#X connect 80 0 123 0;
#X connect 81 0 125 0;
#X connect 82 0 127 0;
#X connect 83 0 129 0;
#X connect 84 0 131 0;
#X connect 85 0 133 0;
#X connect 86 0 87 1;
#X connect 87 0 48 0;
#X connect 88 0 89 1;
#X connect 89 0 48 0;
#X connect 90 0 91 1;
#X connect 91 0 48 0;
#X connect 92 0 93 1;
#X connect 93 0 48 0;
#X connect 94 0 95 1;
#X connect 95 0 48 0;
#X connect 96 0 97 1;
#X connect 97 0 48 0;
#X connect 98 0 99 1;
#X connect 99 0 48 0;
#X connect 100 0 101 1;
#X connect 101 0 48 0;
#X connect 102 0 103 1;
#X connect 103 0 48 0;
#X connect 104 0 105 1;
#X connect 105 0 48 0;
#X connect 106 0 107 1;
#X connect 107 0 48 0;
#X connect 108 0 109 1;
#X connect 109 0 48 0;
#X connect 110 0 111 1;
#X connect 111 0 48 0;
#X connect 112 0 113 1;
#X connect 113 0 48 0;
#X connect 114 0 115 1;
#X connect 115 0 48 0;
#X connect 116 0 117 1;
#X connect 117 0 48 0;
#X connect 118 0 119 1;
#X connect 119 0 48 0;
#X connect 120 0 121 1;
#X connect 121 0 48 0;
#X connect 122 0 123 1;
#X connect 123 0 48 0;
#X connect 124 0 125 1;
#X connect 125 0 48 0;
#X connect 126 0 127 1;
#X connect 127 0 48 0;
#X connect 128 0 129 1;
#X connect 129 0 48 0;
#X connect 130 0 131 1;
#X connect 131 0 48 0;
#X connect 132 0 133 1;
#X connect 133 0 48 0;
#X connect 134 0 17 0;
#X connect 135 0 17 0;
#X connect 136 0 17 0;
#X connect 137 0 17 0;
#X restore 516 391 pd nxPiano1_PatternVelocity------------------------------------
;
#N canvas 0 25 1016 636 nxPiano1_PatternNotes------------------------------------
0;
#X obj 848 414 textfile;
#X msg 696 252 rewind;
#X obj 754 253 loadbang;
#X obj 696 208 loadbang;
#X msg 848 339 bang;
#X floatatom 848 308 5 0 0 0 - - -;
#X msg 848 226 bang;
#X msg 891 225 stop;
#X obj 917 253 - 1;
#X obj 696 231 delay 1;
#X obj 848 278 counter 0 1524;
#X msg 929 225 bang;
#X obj 848 251 metro 1;
#X obj 848 197 delay 1;
#X msg 848 377 read nxInstrument008_PatternsFile.txt;
#X obj 518 -10 r Piano1_Pattern1;
#X obj 518 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 848 169 5 0 0 0 - - -;
#X obj 629 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 629 -10 r Piano1_Pattern2;
#X obj 738 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 738 -10 r Piano1_Pattern3;
#X obj 848 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 848 -10 r Piano1_Pattern4;
#X floatatom 36 424 5 0 0 0 - - -;
#X obj 9 458 float;
#X floatatom 73 424 5 0 0 0 - - -;
#X obj 46 458 float;
#X floatatom 110 424 5 0 0 0 - - -;
#X obj 83 458 float;
#X floatatom 147 424 5 0 0 0 - - -;
#X obj 120 458 float;
#X floatatom 186 424 5 0 0 0 - - -;
#X obj 159 458 float;
#X floatatom 223 424 5 0 0 0 - - -;
#X obj 196 458 float;
#X floatatom 260 424 5 0 0 0 - - -;
#X obj 233 458 float;
#X floatatom 297 424 5 0 0 0 - - -;
#X obj 270 458 float;
#X floatatom 336 423 5 0 0 0 - - -;
#X obj 309 457 float;
#X floatatom 373 423 5 0 0 0 - - -;
#X obj 346 457 float;
#X floatatom 410 423 5 0 0 0 - - -;
#X obj 383 457 float;
#X floatatom 447 423 5 0 0 0 - - -;
#X obj 420 457 float;
#X obj 9 597 outlet;
#X obj 8 5 inlet;
#X obj 49 5 inlet;
#X obj 88 5 inlet;
#X obj 129 5 inlet;
#X obj 167 5 inlet;
#X obj 208 5 inlet;
#X obj 247 5 inlet;
#X obj 288 5 inlet;
#X obj 328 5 inlet;
#X obj 369 5 inlet;
#X obj 408 5 inlet;
#X obj 447 5 inlet;
#X obj 446 289 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0;
#X obj 515 96 inlet;
#X obj 556 96 inlet;
#X obj 595 96 inlet;
#X obj 636 96 inlet;
#X obj 674 96 inlet;
#X obj 715 96 inlet;
#X obj 754 96 inlet;
#X obj 795 96 inlet;
#X obj 835 96 inlet;
#X obj 876 96 inlet;
#X obj 915 96 inlet;
#X obj 954 96 inlet;
#X obj 993 95 inlet;
#X obj 1034 95 inlet;
#X obj 1073 95 inlet;
#X obj 1114 95 inlet;
#X obj 1152 95 inlet;
#X obj 1193 95 inlet;
#X obj 1232 95 inlet;
#X obj 1273 95 inlet;
#X obj 1313 95 inlet;
#X obj 1354 95 inlet;
#X obj 1393 95 inlet;
#X obj 1432 95 inlet;
#X floatatom 152 486 5 0 0 0 - - -;
#X obj 125 520 float;
#X floatatom 189 486 5 0 0 0 - - -;
#X obj 162 520 float;
#X floatatom 226 486 5 0 0 0 - - -;
#X obj 199 520 float;
#X floatatom 263 486 5 0 0 0 - - -;
#X obj 236 520 float;
#X floatatom 302 486 5 0 0 0 - - -;
#X obj 275 520 float;
#X floatatom 339 486 5 0 0 0 - - -;
#X obj 312 520 float;
#X floatatom 376 486 5 0 0 0 - - -;
#X obj 349 520 float;
#X floatatom 413 486 5 0 0 0 - - -;
#X obj 386 520 float;
#X floatatom 452 485 5 0 0 0 - - -;
#X obj 425 519 float;
#X floatatom 489 485 5 0 0 0 - - -;
#X obj 462 519 float;
#X floatatom 526 485 5 0 0 0 - - -;
#X obj 499 519 float;
#X floatatom 563 485 5 0 0 0 - - -;
#X obj 536 519 float;
#X floatatom 258 552 5 0 0 0 - - -;
#X obj 231 586 float;
#X floatatom 295 552 5 0 0 0 - - -;
#X obj 268 586 float;
#X floatatom 332 552 5 0 0 0 - - -;
#X obj 305 586 float;
#X floatatom 369 552 5 0 0 0 - - -;
#X obj 342 586 float;
#X floatatom 408 552 5 0 0 0 - - -;
#X obj 381 586 float;
#X floatatom 445 552 5 0 0 0 - - -;
#X obj 418 586 float;
#X floatatom 482 552 5 0 0 0 - - -;
#X obj 455 586 float;
#X floatatom 519 552 5 0 0 0 - - -;
#X obj 492 586 float;
#X floatatom 558 551 5 0 0 0 - - -;
#X obj 531 585 float;
#X floatatom 595 551 5 0 0 0 - - -;
#X obj 568 585 float;
#X floatatom 632 551 5 0 0 0 - - -;
#X obj 605 585 float;
#X floatatom 669 551 5 0 0 0 - - -;
#X obj 642 585 float;
#X msg 518 45 2;
#X msg 629 45 6;
#X msg 738 45 10;
#X msg 848 45 14;
#X connect 0 0 61 0;
#X connect 1 0 0 0;
#X connect 2 0 14 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 0 0;
#X connect 15 0 16 0;
#X connect 16 0 134 0;
#X connect 17 0 8 0;
#X connect 17 0 13 0;
#X connect 17 0 1 0;
#X connect 18 0 135 0;
#X connect 19 0 18 0;
#X connect 20 0 136 0;
#X connect 21 0 20 0;
#X connect 22 0 137 0;
#X connect 23 0 22 0;
#X connect 24 0 25 1;
#X connect 25 0 48 0;
#X connect 26 0 27 1;
#X connect 27 0 48 0;
#X connect 28 0 29 1;
#X connect 29 0 48 0;
#X connect 30 0 31 1;
#X connect 31 0 48 0;
#X connect 32 0 33 1;
#X connect 33 0 48 0;
#X connect 34 0 35 1;
#X connect 35 0 48 0;
#X connect 36 0 37 1;
#X connect 37 0 48 0;
#X connect 38 0 39 1;
#X connect 39 0 48 0;
#X connect 40 0 41 1;
#X connect 41 0 48 0;
#X connect 42 0 43 1;
#X connect 43 0 48 0;
#X connect 44 0 45 1;
#X connect 45 0 48 0;
#X connect 46 0 47 1;
#X connect 47 0 48 0;
#X connect 49 0 25 0;
#X connect 50 0 27 0;
#X connect 51 0 29 0;
#X connect 52 0 31 0;
#X connect 53 0 33 0;
#X connect 54 0 35 0;
#X connect 55 0 37 0;
#X connect 56 0 39 0;
#X connect 57 0 41 0;
#X connect 58 0 43 0;
#X connect 59 0 45 0;
#X connect 60 0 47 0;
#X connect 61 0 24 0;
#X connect 61 1 26 0;
#X connect 61 2 28 0;
#X connect 61 3 30 0;
#X connect 61 4 32 0;
#X connect 61 5 34 0;
#X connect 61 6 36 0;
#X connect 61 7 38 0;
#X connect 61 8 40 0;
#X connect 61 9 42 0;
#X connect 61 10 44 0;
#X connect 61 11 46 0;
#X connect 61 12 86 0;
#X connect 61 13 88 0;
#X connect 61 14 90 0;
#X connect 61 15 92 0;
#X connect 61 16 94 0;
#X connect 61 17 96 0;
#X connect 61 18 98 0;
#X connect 61 19 100 0;
#X connect 61 20 102 0;
#X connect 61 21 104 0;
#X connect 61 22 106 0;
#X connect 61 23 108 0;
#X connect 61 24 110 0;
#X connect 61 25 112 0;
#X connect 61 26 114 0;
#X connect 61 27 116 0;
#X connect 61 28 118 0;
#X connect 61 29 120 0;
#X connect 61 30 122 0;
#X connect 61 31 124 0;
#X connect 61 32 126 0;
#X connect 61 33 128 0;
#X connect 61 34 130 0;
#X connect 61 35 132 0;
#X connect 62 0 87 0;
#X connect 63 0 89 0;
#X connect 64 0 91 0;
#X connect 65 0 93 0;
#X connect 66 0 95 0;
#X connect 67 0 97 0;
#X connect 68 0 99 0;
#X connect 69 0 101 0;
#X connect 70 0 103 0;
#X connect 71 0 105 0;
#X connect 72 0 107 0;
#X connect 73 0 109 0;
#X connect 74 0 111 0;
#X connect 75 0 113 0;
#X connect 76 0 115 0;
#X connect 77 0 117 0;
#X connect 78 0 119 0;
#X connect 79 0 121 0;
#X connect 80 0 123 0;
#X connect 81 0 125 0;
#X connect 82 0 127 0;
#X connect 83 0 129 0;
#X connect 84 0 131 0;
#X connect 85 0 133 0;
#X connect 86 0 87 1;
#X connect 87 0 48 0;
#X connect 88 0 89 1;
#X connect 89 0 48 0;
#X connect 90 0 91 1;
#X connect 91 0 48 0;
#X connect 92 0 93 1;
#X connect 93 0 48 0;
#X connect 94 0 95 1;
#X connect 95 0 48 0;
#X connect 96 0 97 1;
#X connect 97 0 48 0;
#X connect 98 0 99 1;
#X connect 99 0 48 0;
#X connect 100 0 101 1;
#X connect 101 0 48 0;
#X connect 102 0 103 1;
#X connect 103 0 48 0;
#X connect 104 0 105 1;
#X connect 105 0 48 0;
#X connect 106 0 107 1;
#X connect 107 0 48 0;
#X connect 108 0 109 1;
#X connect 109 0 48 0;
#X connect 110 0 111 1;
#X connect 111 0 48 0;
#X connect 112 0 113 1;
#X connect 113 0 48 0;
#X connect 114 0 115 1;
#X connect 115 0 48 0;
#X connect 116 0 117 1;
#X connect 117 0 48 0;
#X connect 118 0 119 1;
#X connect 119 0 48 0;
#X connect 120 0 121 1;
#X connect 121 0 48 0;
#X connect 122 0 123 1;
#X connect 123 0 48 0;
#X connect 124 0 125 1;
#X connect 125 0 48 0;
#X connect 126 0 127 1;
#X connect 127 0 48 0;
#X connect 128 0 129 1;
#X connect 129 0 48 0;
#X connect 130 0 131 1;
#X connect 131 0 48 0;
#X connect 132 0 133 1;
#X connect 133 0 48 0;
#X connect 134 0 17 0;
#X connect 135 0 17 0;
#X connect 136 0 17 0;
#X connect 137 0 17 0;
#X restore 146 402 pd nxPiano1_PatternNotes------------------------------------
;
#X floatatom 516 544 5 0 0 0 - - -;
#X floatatom 476 544 5 0 0 0 - - -;
#X obj 476 603 noteout 1;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 2 0 6 0;
#X connect 3 0 0 0;
#X connect 4 0 1 0;
#X connect 4 1 3 0;
#X connect 5 0 2 0;
#X connect 6 0 13 0;
#X connect 6 0 12 0;
#X connect 6 1 13 1;
#X connect 6 1 12 1;
#X connect 6 2 13 2;
#X connect 6 2 12 2;
#X connect 6 3 13 3;
#X connect 6 3 12 3;
#X connect 6 4 13 4;
#X connect 6 4 12 4;
#X connect 6 5 13 5;
#X connect 6 5 12 5;
#X connect 6 6 13 6;
#X connect 6 6 12 6;
#X connect 6 7 13 7;
#X connect 6 7 12 7;
#X connect 6 8 13 8;
#X connect 6 8 12 8;
#X connect 6 9 13 9;
#X connect 6 9 12 9;
#X connect 6 10 13 10;
#X connect 6 10 12 10;
#X connect 6 11 13 11;
#X connect 6 11 12 11;
#X connect 6 12 13 12;
#X connect 6 12 12 12;
#X connect 6 13 13 13;
#X connect 6 13 12 13;
#X connect 6 14 13 14;
#X connect 6 14 12 14;
#X connect 6 15 13 15;
#X connect 6 15 12 15;
#X connect 6 16 13 16;
#X connect 6 16 12 16;
#X connect 6 17 13 17;
#X connect 6 17 12 17;
#X connect 6 18 13 18;
#X connect 6 18 12 18;
#X connect 6 19 13 19;
#X connect 6 19 12 19;
#X connect 6 20 13 20;
#X connect 6 20 12 20;
#X connect 6 21 13 21;
#X connect 6 21 12 21;
#X connect 6 22 13 22;
#X connect 6 22 12 22;
#X connect 6 23 13 23;
#X connect 6 23 12 23;
#X connect 6 24 13 24;
#X connect 6 24 12 24;
#X connect 6 25 13 25;
#X connect 6 25 12 25;
#X connect 6 26 13 26;
#X connect 6 26 12 26;
#X connect 6 27 13 27;
#X connect 6 27 12 27;
#X connect 6 28 13 28;
#X connect 6 28 12 28;
#X connect 6 29 13 29;
#X connect 6 29 12 29;
#X connect 6 30 13 30;
#X connect 6 30 12 30;
#X connect 6 31 13 31;
#X connect 6 31 12 31;
#X connect 6 32 13 32;
#X connect 6 32 12 32;
#X connect 6 33 13 33;
#X connect 6 33 12 33;
#X connect 6 34 13 34;
#X connect 6 34 12 34;
#X connect 6 35 13 35;
#X connect 6 35 12 35;
#X connect 7 0 10 0;
#X connect 8 0 9 0;
#X connect 9 0 4 0;
#X connect 10 0 5 4;
#X connect 11 0 0 1;
#X connect 12 0 14 0;
#X connect 13 0 15 0;
#X connect 14 0 16 1;
#X connect 15 0 16 0;
#X restore 68 35 pd nxPiano1;
#N canvas 0 25 1016 657 nxSynth1 0;
#X obj 42 118 metroplus 125 125 125 125 125 125 125 125 125 125 125
125;
#X obj 42 87 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 42 210 5 0 0 0 - - -;
#X msg 70 86 stop;
#X obj 42 59 select 1 0;
#X obj 42 180 counter 36;
#X obj 42 249 select 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36;
#X floatatom 42 32 5 0 0 0 - - -;
#X floatatom 119 164 5 0 0 0 - - -;
#X floatatom 516 544 5 0 0 0 - - -;
#X floatatom 476 544 5 0 0 0 - - -;
#X obj 42 7 r Synth1_ONOFF;
#N canvas 0 25 1016 657 nxSynth1_PatternDur 0;
#X obj 184 318 textfile;
#X msg 126 255 rewind;
#X obj 184 256 loadbang;
#X obj 126 211 loadbang;
#X msg 278 233 bang;
#X floatatom 278 202 5 0 0 0 - - -;
#X msg 278 120 bang;
#X msg 321 119 stop;
#X obj 347 147 - 1;
#X obj 126 234 delay 1;
#X obj 278 172 counter 0 1524;
#X msg 359 119 bang;
#X obj 278 145 metro 1;
#X obj 278 91 delay 1;
#X msg 184 281 read nxInstrument008_PatternsFile.txt;
#X obj 184 353 outlet;
#X obj 278 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 278 63 5 0 0 0 - - -;
#X obj 389 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 498 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 608 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 278 -22 r Synth1_Pattern1;
#X obj 389 -22 r Synth1_Pattern2;
#X obj 498 -22 r Synth1_Pattern3;
#X obj 608 -22 r Synth1_Pattern4;
#X msg 278 33 20;
#X msg 389 33 24;
#X msg 498 33 28;
#X msg 608 33 32;
#X connect 0 0 15 0;
#X connect 1 0 0 0;
#X connect 2 0 14 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 0 0;
#X connect 16 0 25 0;
#X connect 17 0 8 0;
#X connect 17 0 13 0;
#X connect 17 0 1 0;
#X connect 18 0 26 0;
#X connect 19 0 27 0;
#X connect 20 0 28 0;
#X connect 21 0 16 0;
#X connect 22 0 18 0;
#X connect 23 0 19 0;
#X connect 24 0 20 0;
#X connect 25 0 17 0;
#X connect 26 0 17 0;
#X connect 27 0 17 0;
#X connect 28 0 17 0;
#X restore 381 85 pd nxSynth1_PatternDur;
#N canvas 0 25 1016 657 nxSynth1_PatternLen 0;
#X obj 184 318 textfile;
#X msg 126 255 rewind;
#X obj 184 256 loadbang;
#X obj 126 211 loadbang;
#X msg 278 233 bang;
#X floatatom 278 202 5 0 0 0 - - -;
#X msg 278 120 bang;
#X msg 321 119 stop;
#X obj 347 147 - 1;
#X obj 126 234 delay 1;
#X obj 278 172 counter 0 1524;
#X msg 359 119 bang;
#X obj 278 145 metro 1;
#X obj 278 91 delay 1;
#X floatatom 184 445 5 0 0 0 - - -;
#X msg 184 281 read nxInstrument008_PatternsFile.txt;
#X obj 184 397 unpack 0;
#X obj 184 486 outlet;
#X obj 278 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 278 63 5 0 0 0 - - -;
#X obj 389 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 498 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 608 5 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 278 33 17;
#X msg 389 33 21;
#X msg 498 33 25;
#X msg 608 33 29;
#X obj 278 -22 r Synth1_Pattern1;
#X obj 389 -22 r Synth1_Pattern2;
#X obj 498 -22 r Synth1_Pattern3;
#X obj 608 -22 r Synth1_Pattern4;
#X connect 0 0 16 0;
#X connect 1 0 0 0;
#X connect 2 0 15 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 17 0;
#X connect 15 0 0 0;
#X connect 16 0 14 0;
#X connect 18 0 23 0;
#X connect 19 0 8 0;
#X connect 19 0 13 0;
#X connect 19 0 1 0;
#X connect 20 0 24 0;
#X connect 21 0 25 0;
#X connect 22 0 26 0;
#X connect 23 0 19 0;
#X connect 24 0 19 0;
#X connect 25 0 19 0;
#X connect 26 0 19 0;
#X connect 27 0 18 0;
#X connect 28 0 20 0;
#X connect 29 0 21 0;
#X connect 30 0 22 0;
#X restore 119 139 pd nxSynth1_PatternLen;
#N canvas 0 25 1016 636 nxSynth1_PatternNotes------------------------------------
0;
#X obj 848 414 textfile;
#X msg 696 252 rewind;
#X obj 754 253 loadbang;
#X obj 696 208 loadbang;
#X msg 848 339 bang;
#X floatatom 848 308 5 0 0 0 - - -;
#X msg 848 226 bang;
#X msg 891 225 stop;
#X obj 917 253 - 1;
#X obj 696 231 delay 1;
#X obj 848 278 counter 0 1524;
#X msg 929 225 bang;
#X obj 848 251 metro 1;
#X obj 848 197 delay 1;
#X msg 848 377 read nxInstrument008_PatternsFile.txt;
#X obj 518 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 848 169 5 0 0 0 - - -;
#X obj 629 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 738 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 848 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 36 424 5 0 0 0 - - -;
#X obj 9 458 float;
#X floatatom 73 424 5 0 0 0 - - -;
#X obj 46 458 float;
#X floatatom 110 424 5 0 0 0 - - -;
#X obj 83 458 float;
#X floatatom 147 424 5 0 0 0 - - -;
#X obj 120 458 float;
#X floatatom 186 424 5 0 0 0 - - -;
#X obj 159 458 float;
#X floatatom 223 424 5 0 0 0 - - -;
#X obj 196 458 float;
#X floatatom 260 424 5 0 0 0 - - -;
#X obj 233 458 float;
#X floatatom 297 424 5 0 0 0 - - -;
#X obj 270 458 float;
#X floatatom 336 423 5 0 0 0 - - -;
#X obj 309 457 float;
#X floatatom 373 423 5 0 0 0 - - -;
#X obj 346 457 float;
#X floatatom 410 423 5 0 0 0 - - -;
#X obj 383 457 float;
#X floatatom 447 423 5 0 0 0 - - -;
#X obj 420 457 float;
#X obj 9 597 outlet;
#X obj 8 5 inlet;
#X obj 49 5 inlet;
#X obj 88 5 inlet;
#X obj 129 5 inlet;
#X obj 167 5 inlet;
#X obj 208 5 inlet;
#X obj 247 5 inlet;
#X obj 288 5 inlet;
#X obj 328 5 inlet;
#X obj 369 5 inlet;
#X obj 408 5 inlet;
#X obj 447 5 inlet;
#X obj 446 289 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0;
#X obj 515 96 inlet;
#X obj 556 96 inlet;
#X obj 595 96 inlet;
#X obj 636 96 inlet;
#X obj 674 96 inlet;
#X obj 715 96 inlet;
#X obj 754 96 inlet;
#X obj 795 96 inlet;
#X obj 835 96 inlet;
#X obj 876 96 inlet;
#X obj 915 96 inlet;
#X obj 954 96 inlet;
#X obj 993 95 inlet;
#X obj 1034 95 inlet;
#X obj 1073 95 inlet;
#X obj 1114 95 inlet;
#X obj 1152 95 inlet;
#X obj 1193 95 inlet;
#X obj 1232 95 inlet;
#X obj 1273 95 inlet;
#X obj 1313 95 inlet;
#X obj 1354 95 inlet;
#X obj 1393 95 inlet;
#X obj 1432 95 inlet;
#X floatatom 152 486 5 0 0 0 - - -;
#X obj 125 520 float;
#X floatatom 189 486 5 0 0 0 - - -;
#X obj 162 520 float;
#X floatatom 226 486 5 0 0 0 - - -;
#X obj 199 520 float;
#X floatatom 263 486 5 0 0 0 - - -;
#X obj 236 520 float;
#X floatatom 302 486 5 0 0 0 - - -;
#X obj 275 520 float;
#X floatatom 339 486 5 0 0 0 - - -;
#X obj 312 520 float;
#X floatatom 376 486 5 0 0 0 - - -;
#X obj 349 520 float;
#X floatatom 413 486 5 0 0 0 - - -;
#X obj 386 520 float;
#X floatatom 452 485 5 0 0 0 - - -;
#X obj 425 519 float;
#X floatatom 489 485 5 0 0 0 - - -;
#X obj 462 519 float;
#X floatatom 526 485 5 0 0 0 - - -;
#X obj 499 519 float;
#X floatatom 563 485 5 0 0 0 - - -;
#X obj 536 519 float;
#X floatatom 258 552 5 0 0 0 - - -;
#X obj 231 586 float;
#X floatatom 295 552 5 0 0 0 - - -;
#X obj 268 586 float;
#X floatatom 332 552 5 0 0 0 - - -;
#X obj 305 586 float;
#X floatatom 369 552 5 0 0 0 - - -;
#X obj 342 586 float;
#X floatatom 408 552 5 0 0 0 - - -;
#X obj 381 586 float;
#X floatatom 445 552 5 0 0 0 - - -;
#X obj 418 586 float;
#X floatatom 482 552 5 0 0 0 - - -;
#X obj 455 586 float;
#X floatatom 519 552 5 0 0 0 - - -;
#X obj 492 586 float;
#X floatatom 558 551 5 0 0 0 - - -;
#X obj 531 585 float;
#X floatatom 595 551 5 0 0 0 - - -;
#X obj 568 585 float;
#X floatatom 632 551 5 0 0 0 - - -;
#X obj 605 585 float;
#X floatatom 669 551 5 0 0 0 - - -;
#X obj 642 585 float;
#X obj 518 -10 r Synth1_Pattern1;
#X obj 629 -10 r Synth1_Pattern2;
#X obj 738 -10 r Synth1_Pattern3;
#X obj 848 -10 r Synth1_Pattern4;
#X msg 518 45 18;
#X msg 629 45 22;
#X msg 738 45 26;
#X msg 848 45 30;
#X connect 0 0 57 0;
#X connect 1 0 0 0;
#X connect 2 0 14 0;
#X connect 3 0 9 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 10 4;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X connect 10 3 7 0;
#X connect 10 3 11 0;
#X connect 11 0 10 2;
#X connect 12 0 10 0;
#X connect 13 0 6 0;
#X connect 14 0 0 0;
#X connect 15 0 134 0;
#X connect 16 0 8 0;
#X connect 16 0 13 0;
#X connect 16 0 1 0;
#X connect 17 0 135 0;
#X connect 18 0 136 0;
#X connect 19 0 137 0;
#X connect 20 0 21 1;
#X connect 21 0 44 0;
#X connect 22 0 23 1;
#X connect 23 0 44 0;
#X connect 24 0 25 1;
#X connect 25 0 44 0;
#X connect 26 0 27 1;
#X connect 27 0 44 0;
#X connect 28 0 29 1;
#X connect 29 0 44 0;
#X connect 30 0 31 1;
#X connect 31 0 44 0;
#X connect 32 0 33 1;
#X connect 33 0 44 0;
#X connect 34 0 35 1;
#X connect 35 0 44 0;
#X connect 36 0 37 1;
#X connect 37 0 44 0;
#X connect 38 0 39 1;
#X connect 39 0 44 0;
#X connect 40 0 41 1;
#X connect 41 0 44 0;
#X connect 42 0 43 1;
#X connect 43 0 44 0;
#X connect 45 0 21 0;
#X connect 46 0 23 0;
#X connect 47 0 25 0;
#X connect 48 0 27 0;
#X connect 49 0 29 0;
#X connect 50 0 31 0;
#X connect 51 0 33 0;
#X connect 52 0 35 0;
#X connect 53 0 37 0;
#X connect 54 0 39 0;
#X connect 55 0 41 0;
#X connect 56 0 43 0;
#X connect 57 0 20 0;
#X connect 57 1 22 0;
#X connect 57 2 24 0;
#X connect 57 3 26 0;
#X connect 57 4 28 0;
#X connect 57 5 30 0;
#X connect 57 6 32 0;
#X connect 57 7 34 0;
#X connect 57 8 36 0;
#X connect 57 9 38 0;
#X connect 57 10 40 0;
#X connect 57 11 42 0;
#X connect 57 12 82 0;
#X connect 57 13 84 0;
#X connect 57 14 86 0;
#X connect 57 15 88 0;
#X connect 57 16 90 0;
#X connect 57 17 92 0;
#X connect 57 18 94 0;
#X connect 57 19 96 0;
#X connect 57 20 98 0;
#X connect 57 21 100 0;
#X connect 57 22 102 0;
#X connect 57 23 104 0;
#X connect 57 24 106 0;
#X connect 57 25 108 0;
#X connect 57 26 110 0;
#X connect 57 27 112 0;
#X connect 57 28 114 0;
#X connect 57 29 116 0;
#X connect 57 30 118 0;
#X connect 57 31 120 0;
#X connect 57 32 122 0;
#X connect 57 33 124 0;
#X connect 57 34 126 0;
#X connect 57 35 128 0;
#X connect 58 0 83 0;
#X connect 59 0 85 0;
#X connect 60 0 87 0;
#X connect 61 0 89 0;
#X connect 62 0 91 0;
#X connect 63 0 93 0;
#X connect 64 0 95 0;
#X connect 65 0 97 0;
#X connect 66 0 99 0;
#X connect 67 0 101 0;
#X connect 68 0 103 0;
#X connect 69 0 105 0;
#X connect 70 0 107 0;
#X connect 71 0 109 0;
#X connect 72 0 111 0;
#X connect 73 0 113 0;
#X connect 74 0 115 0;
#X connect 75 0 117 0;
#X connect 76 0 119 0;
#X connect 77 0 121 0;
#X connect 78 0 123 0;
#X connect 79 0 125 0;
#X connect 80 0 127 0;
#X connect 81 0 129 0;
#X connect 82 0 83 1;
#X connect 83 0 44 0;
#X connect 84 0 85 1;
#X connect 85 0 44 0;
#X connect 86 0 87 1;
#X connect 87 0 44 0;
#X connect 88 0 89 1;
#X connect 89 0 44 0;
#X connect 90 0 91 1;
#X connect 91 0 44 0;
#X connect 92 0 93 1;
#X connect 93 0 44 0;
#X connect 94 0 95 1;
#X connect 95 0 44 0;
#X connect 96 0 97 1;
#X connect 97 0 44 0;
#X connect 98 0 99 1;
#X connect 99 0 44 0;
#X connect 100 0 101 1;
#X connect 101 0 44 0;
#X connect 102 0 103 1;
#X connect 103 0 44 0;
#X connect 104 0 105 1;
#X connect 105 0 44 0;
#X connect 106 0 107 1;
#X connect 107 0 44 0;
#X connect 108 0 109 1;
#X connect 109 0 44 0;
#X connect 110 0 111 1;
#X connect 111 0 44 0;
#X connect 112 0 113 1;
#X connect 113 0 44 0;
#X connect 114 0 115 1;
#X connect 115 0 44 0;
#X connect 116 0 117 1;
#X connect 117 0 44 0;
#X connect 118 0 119 1;
#X connect 119 0 44 0;
#X connect 120 0 121 1;
#X connect 121 0 44 0;
#X connect 122 0 123 1;
#X connect 123 0 44 0;
#X connect 124 0 125 1;
#X connect 125 0 44 0;
#X connect 126 0 127 1;
#X connect 127 0 44 0;
#X connect 128 0 129 1;
#X connect 129 0 44 0;
#X connect 130 0 15 0;
#X connect 131 0 17 0;
#X connect 132 0 18 0;
#X connect 133 0 19 0;
#X connect 134 0 16 0;
#X connect 135 0 16 0;
#X connect 136 0 16 0;
#X connect 137 0 16 0;
#X restore 146 402 pd nxSynth1_PatternNotes------------------------------------
;
#N canvas 0 25 1016 636 nxSynth1_PatternVelocity------------------------------------
0;
#X obj 848 414 textfile;
#X msg 696 252 rewind;
#X obj 754 253 loadbang;
#X obj 696 208 loadbang;
#X msg 848 339 bang;
#X floatatom 848 308 5 0 0 0 - - -;
#X msg 848 226 bang;
#X msg 891 225 stop;
#X obj 917 253 - 1;
#X obj 696 231 delay 1;
#X obj 848 278 counter 0 1524;
#X msg 929 225 bang;
#X obj 848 251 metro 1;
#X obj 848 197 delay 1;
#X msg 848 377 read nxInstrument008_PatternsFile.txt;
#X obj 518 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 848 169 5 0 0 0 - - -;
#X obj 629 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 738 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 848 17 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 36 424 5 0 0 0 - - -;
#X obj 9 458 float;
#X floatatom 73 424 5 0 0 0 - - -;
#X obj 46 458 float;
#X floatatom 110 424 5 0 0 0 - - -;
#X obj 83 458 float;
#X floatatom 147 424 5 0 0 0 - - -;
#X obj 120 458 float;
#X floatatom 186 424 5 0 0 0 - - -;
#X obj 159 458 float;
#X floatatom 223 424 5 0 0 0 - - -;
#X obj 196 458 float;
#X floatatom 260 424 5 0 0 0 - - -;
#X obj 233 458 float;
#X floatatom 297 424 5 0 0 0 - - -;
#X obj 270 458 float;
#X floatatom 336 423 5 0 0 0 - - -;
#X obj 309 457 float;
#X floatatom 373 423 5 0 0 0 - - -;
#X obj 346 457 float;
#X floatatom 410 423 5 0 0 0 - - -;
#X obj 383 457 float;
#X floatatom 447 423 5 0 0 0 - - -;
#X obj 420 457 float;
#X obj 9 597 outlet;
#X obj 8 5 inlet;
#X obj 49 5 inlet;
#X obj 88 5 inlet;
#X obj 129 5 inlet;
#X obj 167 5 inlet;
#X obj 208 5 inlet;
#X obj 247 5 inlet;
#X obj 288 5 inlet;
#X obj 328 5 inlet;
#X obj 369 5 inlet;
#X obj 408 5 inlet;
#X obj 447 5 inlet;
#X obj 446 289 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0;
#X obj 515 96 inlet;
#X obj 556 96 inlet;
#X obj 595 96 inlet;
#X obj 636 96 inlet;
#X obj 674 96 inlet;
#X obj 715 96 inlet;
#X obj 754 96 inlet;
#X obj 795 96 inlet;
#X obj 835 96 inlet;
#X obj 876 96 inlet;
#X obj 915 96 inlet;
#X obj 954 96 inlet;
#X obj 993 95 inlet;
#X obj 1034 95 inlet;
#X obj 1073 95 inlet;
#X obj 1114 95 inlet;
#X obj 1152 95 inlet;
#X obj 1193 95 inlet;
#X obj 1232 95 inlet;
#X obj 1273 95 inlet;
#X obj 1313 95 inlet;
#X obj 1354 95 inlet;
#X obj 1393 95 inlet;
#X obj 1432 95 inlet;
#X floatatom 152 486 5 0 0 0 - - -;
#X obj 125 520 float;
#X floatatom 189 486 5 0 0 0 - - -;
#X obj 162 520 float;
#X floatatom 226 486 5 0 0 0 - - -;
#X obj 199 520 float;
#X floatatom 263 486 5 0 0 0 - - -;
#X obj 236 520 float;
#X floatatom 302 486 5 0 0 0 - - -;
#X obj 275 520 float;
#X floatatom 339 486 5 0 0 0 - - -;
#X obj 312 520 float;
#X floatatom 376 486 5 0 0 0 - - -;
#X obj 349 520 float;
#X floatatom 413 486 5 0 0 0 - - -;
#X obj 386 520 float;
#X floatatom 452 485 5 0 0 0 - - -;
#X obj 425 519 float;
#X floatatom 489 485 5 0 0 0 - - -;
#X obj 462 519 float;
#X floatatom 526 485 5 0 0 0 - - -;
#X obj 499 519 float;
#X floatatom 563 485 5 0 0 0 - - -;
#X obj 536 519 float;
#X floatatom 258 552 5 0 0 0 - - -;
#X obj 231 586 float;
#X floatatom 295 552 5 0 0 0 - - -;
#X obj 268 586 float;
#X floatatom 332 552 5 0 0 0 - - -;
#X obj 305 586 float;
#X floatatom 369 552 5 0 0 0 - - -;
#X obj 342 586 float;
#X floatatom 408 552 5 0 0 0 - - -;
#X obj 381 586 float;
#X floatatom 445 552 5 0 0 0 - - -;
#X obj 418 586 float;
#X floatatom 482 552 5 0 0 0 - - -;
#X obj 455 586 float;
#X floatatom 519 552 5 0 0 0 - - -;
#X obj 492 586 float;
#X