Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. from mididings import *
  2.  
  3. config(
  4. out_ports = ['sampler'],
  5. )
  6.  
  7. drums = Velocity(curve=-2.5) >> [
  8. KeyFilter(notes=[36]) >> Key(36), KeyFilter(notes=[37]) >> Key(37),
  9. KeyFilter(notes=[38]) >> Key(38), KeyFilter(notes=[39]) >> Key(39),
  10. KeyFilter(notes=[40]) >> Key(40), KeyFilter(notes=[41]) >> Key(41),
  11. KeyFilter(notes=[42]) >> Key(42), KeyFilter(notes=[43]) >> Key(43),
  12. KeyFilter(notes=[44]) >> Key(44), KeyFilter(notes=[45]) >> Key(45),
  13. KeyFilter(notes=[46]) >> Key(46), KeyFilter(notes=[47]) >> Key(47),
  14. KeyFilter(notes=[48]) >> Key(48), KeyFilter(notes=[49]) >> Key(49),
  15. KeyFilter(notes=[50]) >> Key(50), KeyFilter(notes=[51]) >> Key(51),
  16. ] >> Output('sampler', 1, 1)
  17.  
  18. pre = Print('input', portnames='in') >> ~Filter(PROGRAM)
  19. post = Print('output', portnames='out')
  20.  
  21. control = Filter(PROGRAM) >> SceneSwitch()
  22.  
  23. scenes = {
  24. 1: Scene("Drums", drums),
  25. }
  26.  
  27. run(
  28. control=control,
  29. pre=pre,
  30. post=post,
  31. scenes=scenes,
  32. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement