def full_report(): res = [] res.append({ "event": "new_channels", "number": len(midi_channels.outports), "text": gui.Color.BLUE + str(len(midi_channels.outports)) + " midi channels created" + gui.Color.CLOSE }) res.append({ "event": "channel_change", "subevent": "request", "number": midi_channels.live_port, "text": gui.Color.GREEN + "New midi port is " + str(midi_channels.live_port) + gui.Color.CLOSE }) for new_rec in Recorder.recorders: res.append({ "event": "new_record", "subevent": "request", "info": new_rec.all_data(), "index": new_rec.index, "text": gui.Color.BLUE + "New record from json " + str(new_rec.index) + gui.Color.CLOSE }) if (get_current_slot() > 0): res.append({ "event": "slot_change", "subevent": "request", "number": get_current_slot(), "text": gui.Color.YELLOW + "Active slot changed to " + str(get_current_slot()) + gui.Color.CLOSE }) res.append({ "event": "groups", "subevent": "json", "info": Recorder.groups, "text": gui.Color.YELLOW + "groups loaded" + gui.Color.CLOSE }) print(res) return res
def handler(c, info): if (len(Recorder.recorders) == 0): return new_vol = info / 127.0 * 2 if (round(new_vol * 100) % 10 == 0): print('current slot', get_current_slot(), 'new vol:', new_vol) current_rec().volume = new_vol
def command_toggle_play(index): print('toggle play' + str(index)) #time.sleep(1.0); s = get_current_slot() set_current_slot(index) Controller.by_name['slot_play'].handler(1) set_current_slot(s) return "success"
def handler(c, info): if (get_current_slot() < 0): new_slot_rec.handler(c, info) return if (info > 0): if (not current_rec().recording): current_rec().record() else: current_rec().stop()
def handler(c, info): if (info > 0): if (get_current_slot() >= 0): if (not current_rec().recording): Recorder(seq).record() set_current_slot(len(Recorder.recorders) - 1) else: Recorder.recorders[-1].stop() else: Recorder(seq).record() set_current_slot(len(Recorder.recorders) - 1)
def handler(c, info): if ((info > 0)): print('current slot:', get_current_slot(), 'volume:', current_rec().volume) #tog_list=Recorder.tog_list() #print('tog_list: '+tog_list) actual = [] for rec in Recorder.recorders: actual.append(rec.playing) flip_list, err = gr_recur(Recorder.groups, actual, get_current_slot(), 4) if err: print('slot_play ERROR. canceled') return print("FLIP_LIST " + str(flip_list)) flip_list.append(get_current_slot()) for slot_number in flip_list: current_r = Recorder.recorders[slot_number] if (not current_r.keep_offset): current_r.offset = ( (current_r.seq.processed_beat) // 4) % current_r.bars current_r.playing = not current_r.playing gui.message({ "event": "toggle_play", "index": current_r.index, "offset": current_r.offset, "status": current_r.playing, "text": gui.Color.YELLOW + str(slot_number) + "playing " + str(current_r.playing) + " volume " + str(current_r.volume) + gui.Color.CLOSE })
def handler(c, info): s = get_current_slot() set_current_slot(index) Controller.by_name['slot_play'].handler(1) set_current_slot(s) print('midi pad control' + str(midi_local))
def command_select(index): set_current_slot(index) print('slot changed to ' + str(get_current_slot())) return "success"