Skip to content

Commit

Permalink
Cleanup and adding tracklisteners for new tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBspheroid committed Mar 26, 2020
1 parent 83fad79 commit 44cda16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 8 additions & 7 deletions Carmine.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

from random import randint

oscEndpoint = RemixNet.OSCEndpoint()
# oscEndpoint.send('/remix/oscserver/startup', 1)
# oscEndpoint.send('/log', "HI FROM HERE!")
oscEndpoint = RemixNet.OSCEndpoint("localhost",9001, "", 9000)
def _(msg):
oscEndpoint.send('/log',msg)

Expand All @@ -27,9 +25,6 @@ class Carmine:
# liveApp.show_message("Oh hai!")
__module__ = __name__

# def clipFire(self):
# # self.song().tracks[1].color_index = randint(1,10)

def __init__(self, c_instance):
# super(Carmine, self).__init__(c_instance)

Expand All @@ -45,9 +40,15 @@ def __init__(self, c_instance):
self.actions = []

_("adding listeners!")
if self.song.visible_tracks_has_listener(self.addListeners) != 1:
self.song.add_visible_tracks_listener(self.addListeners)

self.addListeners()
self.instance.show_message("CARMINE")

def refresh_state(self):
pass

def add_slotlistener(self, slot, tid, cid):
cb = lambda :self.slot_changestate(slot, tid, cid)

Expand Down Expand Up @@ -120,7 +121,7 @@ def loading_failed(self, clip):

def addListeners(self):
self.rem_clip_listeners()

tracks = self.song.visible_tracks
clipSlots = []
for track in tracks:
Expand Down
1 change: 0 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# from __future__ import absolute_import, print_function, unicode_literals
import sys

from Carmine import Carmine
Expand Down

0 comments on commit 44cda16

Please sign in to comment.