Change for working version
This commit is contained in:
parent
90b63b24d2
commit
b8b912a10a
3 changed files with 76 additions and 73 deletions
|
@ -12,4 +12,4 @@ voice:
|
||||||
input_volume: 100
|
input_volume: 100
|
||||||
output_volume: 30
|
output_volume: 30
|
||||||
file_address: "http://hugveycmd.local:8888"
|
file_address: "http://hugveycmd.local:8888"
|
||||||
output_driver: pulseaudio
|
output_driver: null
|
||||||
|
|
|
@ -628,7 +628,7 @@ class Diversion(object):
|
||||||
}]
|
}]
|
||||||
"""
|
"""
|
||||||
self.counter +=1
|
self.counter +=1
|
||||||
|
# story.logger.warn(f"CREATING DIRECTIONS FOR {startMsg.id}")
|
||||||
finishMessageIds = story.getFinishesForMsg(startMsg)
|
finishMessageIds = story.getFinishesForMsg(startMsg)
|
||||||
finalTimeoutDuration = timeoutDuration
|
finalTimeoutDuration = timeoutDuration
|
||||||
finalContainsDurations = replyContainsDurations
|
finalContainsDurations = replyContainsDurations
|
||||||
|
@ -647,6 +647,7 @@ class Diversion(object):
|
||||||
finalContainsDurations = json.loads(condition.originalJsonString)['vars']['delays']
|
finalContainsDurations = json.loads(condition.originalJsonString)['vars']['delays']
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
|
# story.logger.warn(f"FINISHES: {finishMessageIds}")
|
||||||
for msgId in finishMessageIds:
|
for msgId in finishMessageIds:
|
||||||
# Some very ugly hack to add a direction & condition
|
# Some very ugly hack to add a direction & condition
|
||||||
i+=1
|
i+=1
|
||||||
|
@ -693,6 +694,7 @@ class Diversion(object):
|
||||||
story.logger.info(f"Created direction: {direction.id} {condition.id} with timeout {finalTimeoutDuration}s")
|
story.logger.info(f"Created direction: {direction.id} {condition.id} with timeout {finalTimeoutDuration}s")
|
||||||
story.add(condition)
|
story.add(condition)
|
||||||
story.add(direction)
|
story.add(direction)
|
||||||
|
# story.logger.warn(f"ADDED DIRECTION {direction.id}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1648,16 +1650,16 @@ class Story(object):
|
||||||
self.timer.pause()
|
self.timer.pause()
|
||||||
|
|
||||||
def calculateFinishesForMsg(self, msgId, depth = 0, checked = []):
|
def calculateFinishesForMsg(self, msgId, depth = 0, checked = []):
|
||||||
if msgId in checked:
|
# if msgId in checked:
|
||||||
return []
|
# return []
|
||||||
|
#
|
||||||
checked.append(msgId)
|
# checked.append(msgId)
|
||||||
|
|
||||||
if not msgId in self.directionsPerMsg or len(self.directionsPerMsg[msgId]) < 1:
|
if not msgId in self.directionsPerMsg or len(self.directionsPerMsg[msgId]) < 1:
|
||||||
# is finish
|
# is finish
|
||||||
return [msgId]
|
return [msgId]
|
||||||
|
|
||||||
if depth > 200:
|
if depth > 100:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
finishes = []
|
finishes = []
|
||||||
|
@ -1690,6 +1692,7 @@ class Story(object):
|
||||||
|
|
||||||
returns message ids
|
returns message ids
|
||||||
"""
|
"""
|
||||||
|
print(msg.id, self.strands)
|
||||||
if msg.id in self.strands:
|
if msg.id in self.strands:
|
||||||
return self.strands[msg.id]
|
return self.strands[msg.id]
|
||||||
|
|
||||||
|
@ -1779,4 +1782,3 @@ class Story(object):
|
||||||
|
|
||||||
def __setstate__(self, state):
|
def __setstate__(self, state):
|
||||||
self.__dict__.update(state)
|
self.__dict__.update(state)
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
#N canvas 200 136 660 592 10;
|
#N canvas 976 211 660 592 10;
|
||||||
#X obj 131 277 dac~;
|
#X obj 131 277 dac~;
|
||||||
#X obj 131 227 readsf~;
|
#X obj 131 227 readsf~;
|
||||||
#X obj 209 209 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
|
#X obj 209 209 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
|
||||||
-1 -1;
|
-1 -1;
|
||||||
#X text 229 206 (re-)start loop;
|
#X text 229 206 (re-)start loop;
|
||||||
#X msg 132 170 open /home/a/projects/pd-play/testaudio.wav \, 1;
|
|
||||||
#X obj 208 459 netsend -u -b;
|
#X obj 208 459 netsend -u -b;
|
||||||
#X obj 208 481 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
|
#X obj 208 481 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
|
||||||
1;
|
1;
|
||||||
#X msg 355 464 disconnect;
|
#X msg 355 464 disconnect;
|
||||||
#X obj 208 393 list prepend send;
|
#X obj 208 393 list prepend send;
|
||||||
|
@ -19,33 +18,35 @@
|
||||||
#X obj 318 84 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
|
#X obj 318 84 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
|
||||||
-1;
|
-1;
|
||||||
#X text 217 60 START;
|
#X text 217 60 START;
|
||||||
#X obj 436 84 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
|
#X obj 436 84 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
|
||||||
1;
|
1;
|
||||||
#X text 309 61 !STOP!;
|
#X text 309 61 !STOP!;
|
||||||
#X text 422 60 Playing indicator;
|
#X text 422 60 Playing indicator;
|
||||||
#X msg 261 118 1;
|
#X msg 261 118 1;
|
||||||
#X msg 330 117 0;
|
#X msg 330 117 0;
|
||||||
#X obj 208 345 oscformat /loop;
|
#X obj 208 345 oscformat /loop;
|
||||||
#X msg 356 434 connect 192.168.178.15 7400;
|
#X msg 356 434 connect 192.168.1.174 7400;
|
||||||
|
#X msg 132 170 open /mnt/stash/hugvey/score38_loop_40s_extra.wav \,
|
||||||
|
1;
|
||||||
#X connect 1 0 0 0;
|
#X connect 1 0 0 0;
|
||||||
#X connect 1 0 0 1;
|
#X connect 1 0 0 1;
|
||||||
#X connect 1 1 2 0;
|
#X connect 1 1 2 0;
|
||||||
#X connect 2 0 4 0;
|
#X connect 2 0 22 0;
|
||||||
#X connect 2 0 13 0;
|
#X connect 2 0 12 0;
|
||||||
#X connect 4 0 1 0;
|
#X connect 4 0 5 0;
|
||||||
#X connect 5 0 6 0;
|
#X connect 6 0 4 0;
|
||||||
#X connect 7 0 5 0;
|
#X connect 7 0 8 0;
|
||||||
#X connect 8 0 9 0;
|
#X connect 8 0 4 0;
|
||||||
#X connect 9 0 5 0;
|
#X connect 9 0 1 0;
|
||||||
#X connect 10 0 1 0;
|
#X connect 10 0 21 0;
|
||||||
#X connect 11 0 22 0;
|
#X connect 10 0 2 0;
|
||||||
#X connect 11 0 2 0;
|
#X connect 10 0 18 0;
|
||||||
#X connect 11 0 19 0;
|
#X connect 12 0 20 0;
|
||||||
#X connect 13 0 21 0;
|
#X connect 13 0 9 0;
|
||||||
#X connect 14 0 10 0;
|
#X connect 13 0 6 0;
|
||||||
#X connect 14 0 7 0;
|
#X connect 13 0 19 0;
|
||||||
#X connect 14 0 20 0;
|
#X connect 18 0 15 0;
|
||||||
#X connect 19 0 16 0;
|
#X connect 19 0 15 0;
|
||||||
#X connect 20 0 16 0;
|
#X connect 20 0 7 0;
|
||||||
#X connect 21 0 8 0;
|
#X connect 21 0 4 0;
|
||||||
#X connect 22 0 5 0;
|
#X connect 22 0 1 0;
|
||||||
|
|
Loading…
Reference in a new issue