In [1]:
import os,sys,inspect
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir) 

from __init__ import *
import mido
import time
import numpy as np
from notemidi import TrigNote, PitchBend, Aftertouch, stop
rtmidi = mido.Backend('mido.backends.rtmidi')
output = rtmidi.open_output(IACDriver)

In [24]:
TrigNote('C3', 60)
PitchBend(-1000)
time.sleep(1)
TrigNote('C3', 0)


C3
C3

In [25]:
# Pitch Bend

TrigNote('C3', 60)
tt = np.linspace(0, 10, 1000)
A = 8000
p = A * np.sin(1*tt)
p = p.astype('int')
for idx, pitch in enumerate(p):
    time.sleep(0.001)
    PitchBend(pitch)
TrigNote('C3', 0)


C3
C3

In [36]:
TrigNote('C3', 60)
time.sleep(1)
Aftertouch('C3', 20)
time.sleep(1)
Aftertouch('C3', 70)
time.sleep(1)
Aftertouch('C3', 100)


TrigNote('C3', 0)


C3
C3

In [22]:
stop() # Supposed to stop everything

In [ ]:


In [ ]: