SuperDirt from Pharo

Hello hello, in the last weeks I have become a Tidal Cycles enthusiast and I am having a lot of fun.
At the same time I have been implementing in my Pharo LiveCoding Package a few new methods inspired by the syntax of Tidal. At the same time I am implementing a way to play SuperDirt directly from Pharo; it is still in fieri but I will let you know when it is usable.
I have been inspired a lot by Tidal and I am trying to keep syntax for patterns creation very close to Tidal one (for example ~ for rests), of course now in a Smalltalk pure OOP way. Of course everything will be credited, explained and deeply thanked when it is ready. I am following this approach because I would like that the users of Pharo LiveCoding package would easily learn and switch to Pharo, and at the same time it would make it easy to Tidal users to have fun with Pharo. The two systems does not really do the same thing, as the Pharo LiveCoding package is focused on creating easily long patterns sand sequences, more than cycles with complex inner segmentations.
I hope this is cool and I do not intend to break any intellectual copyright or to copy the work that has been done with Tidal, but I rally think about this as a Pharo port of Tidal (both partial and augmented).
I would like to hear your thoughts about this.
peace from Italy.


OMG no way !!! i love this!!! i literally asked ChatGPT to "make code examples of a SmallTalk port of TidalCycles" and sent it to the Discord, this is what it created lol:

// Define a pattern
pattern := { 1, 1, 2, 3, 5, 8 }.

// Play the pattern with a sine wave
play: { |i| (pattern at: i) sin }.

// Modify the pattern by applying a transformation
pattern := pattern collect: [ :x | x * 2 ].

// Play the transformed pattern
play: { |i| (pattern at: i) sin }.

// Define a custom pattern generator
generator := [ :n | (1 to: n) collect: [ :i | i * i ] ].

// Play the custom pattern generator
play: { |i| (generator value: i) sin }.

oh and don't worry about copyright! Tidal is GPL-3 ++ we all love the idea of ports of tidalcycles, as you may have seen the development of Vortex (Python), Strudel (Javascript) and Kidal (Kotlin)

1 Like

this is an example of the syntax:

"create a Performance"
p := Performance new.
x := 64 randomTrigs soundPattern: #('dcm8') ; samplesIndex: (64 randomInts: 32) .
z := '~ ~ hh ~' forDirt .
b := (16 tumbao , 16 rumba ) sounds: 'conga:1 bongo djembe bongo:2' forDirt .
k := 16 downbeats sounds: 'bd'.
" add the patterns to the performance
"play the performance at 136 bpm for 64 bars"
b playToDirt: 64 bars rate: 156 bpm.

the Performance is a Dictionary and its Keys'Values can be added, removed, modified in real time.
I am struggling a little bit with the timestamps of the OSC Bundle but I hope to have something stable very soon.

of course being Pharo a reflective system is very easy to modify the methods or to add you own classes and methods.

Hi @lucretiomsp,

As @ritchse says, it's always good to see new live coding systems! There is the matter of Tidal's license using the GPLv3 though.

This is really a question for a lawyer, and I'm not one of those! So take the following as you like..

I understand that a port of Tidal to another language (for example, looking at Tidal's code and translating its implementation) would be considered a 'derivative work' and so would need to use the same GPL license. I think Pharo is MIT licensed, which is compatible, but if you include GPL code in a program then I believe (again, I'm not a lawyer..) the whole thing would effectively become distributed under the GPL, which you might not want. Because Tidal is a collaborative effort, it would be difficult to get permission to use it under a different license, as you'd need permission from every contributor to the code you're porting.

However it sounds like you are not porting Tidal's implementation, but making something inspired from the syntax of its mini-notation, without necessarily looking at its code. I think that's probably fine according to the license. Furthermore, the mini-notation syntax is not a Tidal invention, but is actually heavily inspired by the amazing Bol Processor software, in particular its polymetric sequences. The bol processor is released under a BSD-style license.

In summary, personally I'm very happy to see people take ideas forward, but free software licenses need to be respected, otherwise they are weakened. Without knowing the details, I don't think the GPL applies to the way you are working here, though.

thanks for the detailed answer and for making me discover the Bol processor software.
At the moment I am doing something that does not port the Tidal implementation but only part of the mini notation (I would say the core of the mini-notation), but my final goal is to have the possibility to port some of the Tidal implementation in terms of cycles :slight_smile:
I will talk more in details with the Pharo people but I am not modifying the Pharo image itself and I think my package will always be a package to download separately from Pharo. so maybe the GPL or the BSD license could apply only to my package. I have to talk now with the Pharo people to understand how it works with licenses for "external" packages

Righto! The GPL FAQ, e.g. this answer has some useful info.. It's a bit of a grey area and gets quite tedious unfortunately!