Skip to content

Commit

Permalink
Fix loop rate bug for timevar tempo and added Group.only method
Browse files Browse the repository at this point in the history
  • Loading branch information
Qirky committed Jan 2, 2018
1 parent 40fbd13 commit 4b34282
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
15 changes: 14 additions & 1 deletion FoxDot/lib/Players.py
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ def new_message(self, index=0, **kwargs):

# Adjust the rate to a given tempo

rate = tempo * rate
rate = float(tempo * rate)

if rate < 0:

Expand Down Expand Up @@ -1890,6 +1890,19 @@ def solo(self, arg=True):

return self

def only(self):

if self.metro is None:

self.__class__.metro = Player.metro

for player in list(self.metro.playing):

if player not in self.players:

player.stop()

return self

def iterate(self, dur=4):
if dur == 0 or dur is None:
Expand Down
2 changes: 1 addition & 1 deletion FoxDot/lib/ServerManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def get_init_node(self, node, bus, group_id, synthdef, packet):
value = []

osc_packet = ["startSound", node, 0, group_id, 'bus', bus, "sus", max_sus] + value

msg.append( osc_packet )

return msg, node
Expand Down
5 changes: 5 additions & 0 deletions FoxDot/lib/Workspace/tmp/tempfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
d1 >> play("x-u-", dur=2).every(4, "stutter")

d2 >> loop("robot110", P[:8], tempo=110)

Clock.bpm=var([120,60],[28,4])
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ FoxDot is a Python programming environment that provides a fast and user-friendl

- Fix `TimeVar` class so it no longer inherits from `Repeatable` i.e. no longer has access to the "every" method.
- Fix pattern bug when creating a pattern using the `P` generator; `P[P(0,2)]` no longer returns `P[0, 2]`. However, `P[(0,2)]` is interpreted exactly as `P[0, 2]` and will return that instead.
- Added more variation to the "formantFilter" effect
- Added more variation to the "formantFilter" effect
- "loop" samples are added "on-the-fly" as opposed to loaded at start up. These can be loaded by filepath (with or without extension)
```python
a1 >> loop("/path/to/sample.wav")
a2 >> loop("/path/to/sample")

a1 >> loop("yeah") # Searches recursively for yeah.(wav|wave|aif|aiff|flac)
a1 >> loop("perc/kick") # Supports directories in the path
a1 >> loop("*kick*", sample=2) # Supports * ? [chars] and [!chars]
a1 >> loop("**/*_Em") # Supports ** as 'recursively all subdirectories'
```

---

Expand Down

0 comments on commit 4b34282

Please sign in to comment.