Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from mididings import *
- config(
- out_ports = ['sampler'],
- )
- drums = Velocity(curve=-2.5) >> [
- KeyFilter(notes=[36]) >> Key(36), KeyFilter(notes=[37]) >> Key(37),
- KeyFilter(notes=[38]) >> Key(38), KeyFilter(notes=[39]) >> Key(39),
- KeyFilter(notes=[40]) >> Key(40), KeyFilter(notes=[41]) >> Key(41),
- KeyFilter(notes=[42]) >> Key(42), KeyFilter(notes=[43]) >> Key(43),
- KeyFilter(notes=[44]) >> Key(44), KeyFilter(notes=[45]) >> Key(45),
- KeyFilter(notes=[46]) >> Key(46), KeyFilter(notes=[47]) >> Key(47),
- KeyFilter(notes=[48]) >> Key(48), KeyFilter(notes=[49]) >> Key(49),
- KeyFilter(notes=[50]) >> Key(50), KeyFilter(notes=[51]) >> Key(51),
- ] >> Output('sampler', 1, 1)
- pre = Print('input', portnames='in') >> ~Filter(PROGRAM)
- post = Print('output', portnames='out')
- control = Filter(PROGRAM) >> SceneSwitch()
- scenes = {
- 1: Scene("Drums", drums),
- }
- run(
- control=control,
- pre=pre,
- post=post,
- scenes=scenes,
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement