def mididings_run(self): if not self.already_set: self.setup() if self.mapping: md.run(md.Call(self.event_mapping)) else: md.run(scenes=self.scenes, control=md.Call(self.event_call)) self.mididings_exit.emit()
def MidDumpSimple(self): print('mididings: run simple dump Print()') patch = ( # filter out SysEx Sensing(ongoing noise for me) ~mid.Filter(mid.SYSRT_SENSING) >> # ~ is invert filter # route it to just print out the event info. mid.Print() ) mid.run(patch)
def start(self): logging.info('Starting processor thread ...') self._processor.start() logging.info('Starting collector (mididings) ...') run(self._collector_patch) logging.info('mididings finished.') self._stop_processing.set() self._processor.join() logging.info('Processing thread joined.')
def MidDumpHookCustom(self): print('mididings: run hooked custom dump') patch = ( # filter out SysEx Sensing(ongoing noise for me) ~mid.Filter(mid.SYSRT_SENSING) >> # ~ is invert filter # route it to just print out the event info. mid.Print() >> # now route it to our custom MidHookedDump mid.Process(MidHookedDump()) ) mid.run(patch)
def start(self): ServerThread.start(self) midiServer.run(midiServer.Call(self.processMIDI))
for p in ps.values(): for op in range(0,6): p['slider_{}'.format(op)] = 'op{}_operator_output_level'.format(op+1) p['slider_6'] = 'feedback' p['slider_7'] = 'lfo_speed' return ps # controller mappings def create_scene(control_scene): '''Create a complete scene from a control event list returned from map_events''' sc = [md.PortFilter('control_in') >> ~md.KeyFilter(notes=[25,26,27]) >> control_scene >> md.Port('synth_out'), md.PortFilter('keys_in') >> md.Print('keys') >> md.Port('synth_out'), md.PortFilter('synth_in') >> md.Print('synth') >> TX7_SysExFilter() >> SaveSysEx('dx7_patch') >> md.Discard()] return sc #return md.Print('scene_input') >> control_scene #return control_scene scenes = create_scenes(fill_pages(), akai, yam, create_scene) #print(scenes) # enable OSC Interface for livedings md.hook(mdosc.OSCInterface(56418, 56419)) md.run(scenes, control=control, pre=pre, post=post)
import settings from pointsons.server.memorize import MemorizeConfig from pointsons.server.osc import PointSonsOSCInterface from pointsons.server.scenes import ps_scenes from pointsons.server.control import ps_control # Filter out notes not in device range, and transpose (required for InterfaceZ cards) note_range_filter = KeyFilter(settings.BOWL_LOWER, settings.BOWL_UPPER) post = note_range_filter >> Transpose(-12) if settings.DEBUG: pre = Print('input', portnames='in') post = post >> Print('output', portnames='out') else: pre = post = None hook( PointSonsOSCInterface(port=settings.SERVER_OSC_PORT, notify_ports=[settings.KINECT_OSC_PORT, settings.UI_OSC_PORT]), MemorizeConfig('config.ps'), AutoRestart(), ) run(scenes=ps_scenes, control=ps_control, pre=pre, post=post)
run( scenes={ # scene 1: play piano. # this will switch the sampler to program 1, then route all events # to it 1: Print() >> [ # we might get info from transport control port, that should be commands PortFilter(control_port) >> Process( state.toggle_state, list_TC, checkTC=True) >> out_command, # regular input input, process CC events for general modifier, if any PortFilter(keyboard_port) >> Process(state.toggle_state, list_modifiers) >> [ # created commands from modifier (with control port) get their output out_command, # what was not used for modifier still might be processed, process CC events for general states, if any PortFilter(keyboard_port) >> Process(state.toggle_state, list_states) >> [ # created commands (with control port) get their output out_command, # process regular keyboard events, that could become controls depending on state of button, first for modifiers -- for which only one is allowed at a time PortFilter(keyboard_port) >> Process( state.toggle_pattern, list_modifiers, only_first=True) >> [ # output pattern for modifier out_command, # process regular keyboard events, that could become controls depending on state of button, first for modifiers PortFilter(keyboard_port) >> Process( state.toggle_pattern, list_states) >> [ # again, new commands get their output out_command, out_keyboard_all ] ], ], ], ], # scene 2: play organ, transposed one octave down 2: [out_control, Velocity(fixed=1) >> out_keyboard_all], # scene 3: to seq64 3: [out_control, out_seq64_pad], # scene 4: same but transposed to reach for the others patches 4: [out_control, Transpose(16) >> out_seq64_pad], }, # control patch: use program changes on channel 16 to switch between # scenes control=Filter(PROGRAM) >> SceneSwitch(), # preprocessing: filter out program changes, everything else is sent to # the current scene pre=~Filter(PROGRAM), )