If you're interested in this, there's a good chance you would enjoy the TidalCycles language for generating music. It's been a mind-expanding experience for me, particularly w/r/t polyrhythms.
Also worth checking out Lil Data [1], an artist affiliated with PC Music who uses TidalCycles and also has a doctorate in some pretty interesting musical research [2].
This is a very cool approach to UI. I've been struggling to design a reasonable UI for poly. I think I saw a similar thing on the youtube channel of Yogev Gabay, but I forgot the name.
Jeff_Brown 670 days ago [-]
+1. Lil Data is fantastic.
runevault 670 days ago [-]
How would you compare Tidal to stuff like Sonic Pi? I admit Haskell appeals to me WAY more than Ruby, though it seems the install process isn't as seamless as SP is.
runevault 670 days ago [-]
So I went through the tutorial and got it set up on my old linux laptop, got it making sounds and managed to go through the workbook tutorial to hear that working. Maybe this will be my excuse to get a bit better with Haskell.
luluganeta 670 days ago [-]
This set by yaxu (Tidalcycles author) is what convinced me to get into livecoding seriously:
(this set is "from scratch", meaning that it opens with an empty file and starts from there, making it clearer to understand what is going on as it builds up)
samstave 670 days ago [-]
2030, USA: 9PM, San Francisco.
As we sit into our booth and the environment closes around use we are greeted with soft, soothing music.
As we get into conversation, the body language, verbal language, laughter and even facial expressions we express inform the mood of the room - and the music that it produces. A certain, unique-to-our-meeting melody. All of this is encoded and played back as music in real time.
Later we can use the melody to replay the mood and dialogue of the night - as everything that was said was encoded into the music heard - but may be decoded to have a recording of the conversation...
For further information, contact
@Cymatic.ai
a_simple_dev 670 days ago [-]
This is so dope! Love seeing the analog rytm used in a coding project like this. Want to see if I can get it to work with my mk-II, should be basically the same.
those are some incredible tones you're working with in the video. are they being generated by the rytm or samples or something else?
Jeff_Brown 670 days ago [-]
That video is of Mike Hodnick, not myself. But to answer your question, the timbres are generally a combination of both things you mention. At its core TidalCycles triggers synths and samplers in SuperCollider. It also controls the effect chain they go through, though, so you can pattern "clean DISTORTED clean clean DISTORTED" as easily as "kick hat snare hat". And sufficiently high-frequency control of the synths will have timbral consequences, too -- alternate, for instance, between two constant frequencies sufficiently quickly and you've built a simple FM synth.
glimshe 670 days ago [-]
Very cool! How is this better than SuperCollider, which I have considered (and learned a bit about) in the past?
Nice! But why shouldn't I just use SuperCollider directly?
Jeff_Brown 670 days ago [-]
They have different aims. SuperCollider gives you outstanding timbral control, but patterning at the melodic or chord level is awkward. TidalCycles is a language for musical patterns, not for generating waveforms directly. If you want to mess with both, I'd recommend starting from the definitions of the synths in SuperDirt, the collection of SuperCollider synths that TidalCycles uses.
TidalCycles does offer a lot of ways to control the timbre -- there are a bunch of effects, including some magical granular stuff. And merely triggering samples at sufficiently high frequencies, particularly frequencies that vary over time, can generate some cool sounds. But SC will give you much more control over that kind of thing.
tessierashpool 670 days ago [-]
SuperCollider is a language, an IDE, and a client/server app for audio programming.
TidalCycles uses a different language, does not tie you to any particular IDE, and is focused on music in particular, not audio in general.
mry2048 670 days ago [-]
[dead]
dredozubov 671 days ago [-]
I’m a guitar player, and I use tablature notation editors such as Guitar Pro a lot. However, it gets complicated fast when I write polyrhythmic/polymetric drum parts, because shifts tend to go over the bar lines and it’s hard to make sense it’s correct visually (may be even harder if you listen to it). The other property of such parts is: it tends to unfold from simple ideas such as “I want to create a drum part that will have a 3 against 4 feel with a kick drum against a snare drum”. The other way to think about it is that it has a simple blueprint, but it’s tricky and error-prone to express in Western musical notation. This is why Polyrhythmix exists. I wanted to have a simple tool to workshop/brainstorm rhythmic ideas and evaluate them by having a MIDI playback. I’m into modern Progressive Rock/Metal music, Fusion, so it all applies very well. I have an impression it may be useful for Indian Carnatic music as well, but I would like to get some insightful confirmation on that.
jcpst 670 days ago [-]
Very excited to see this. It's very much a tool I would use, excited to give it a spin after work tonight. I also look forward to reading the code.
Other cool music tools I've seen implemented in rust:
A while back I wanted to make some tools to aid in composition and was using rust. Very partially baked, but a fun pet project to learn the language with. Generates just intonation pitch lattices based on my research of Ben Johnston's compositional approach. https://github.com/jcpst/johnston
dredozubov 670 days ago [-]
Thanks for commenting and reaching out, would love to know what you think of poly. I was learning Rust along the way, so there is definitely room for improvement. From the memory allocation perspective at least, I didn't paid it much mind as the practical applications are not that memory intensive.
No clue what intonation pitch lattices are, but now I'm interested to learn!
jcpst 670 days ago [-]
I was having fun writing one liners with poly, leaving my file explorer open and dragging the output file straight into a Ableton channel with a drum rack set up.
I also tried making a web UI with it via Yew. I got it all compiling and running in the browser, but the crate is all about that CLI. I would have to write a lot of the code that’s in the CLI file to call the create_smf function.
It might be worth considering designing the library’s API to be a bit friendlier to an end user. I think there’s cool stuff that could be done with it. Or at least that’s something I want to do :D
dredozubov 669 days ago [-]
Do you mind shooting me an email or opening an issue on github? I was thinking about doing the UI myself, but I wasn’t sure how to do make it nice for the end user. It’s certainly a good idea to rework the API to be UI-friendly.
dekhn 670 days ago [-]
I have only familiarity with western musical notation, and it too me a while to get there. Tablature and track notation (digital audio workstation) both were completely intuitive to me. Is there anything that argues for learning Western musical notation- IE, does it help express some things eloquently/efficiently/naturally? Every time I ask classically trained musicians (who started with a piano and a music book) they look at me like I'm crazy and dumb.
jcpst 670 days ago [-]
I like to think of western music notation as not the most intuitive choice for a lot of popular styles of music. But it's kind of like when people talk about X programming language "making hard things possible".
It's like math notation. There is a canon of work over a very long period of time that can be used as a foundation for expressing many different intricate ideas in a compact way. And in the 20th century tons of non-traditional notation styles have been thrown into the western mix.
dredozubov 670 days ago [-]
DAWs and tablature editors mimic musical notation anyway. I suppose replication over the bars lines can be done more easily in DAWs that in tablature editors, but I still wanted a tool to generate the part from the "blueprint" rather than copy-pasting and double-checking all over the place.
What I want to do is to learn a bit more about Konnakol, which is the Indian musical art expressed in percussive syllables. I have an impression that building a bridge between Konnakol and western notation can really get the creative juices flowing.
dekhn 670 days ago [-]
yeah, I have a zakir hussein track where he does konnakol and it's quite impressive.
Jeff_Brown 670 days ago [-]
Music notation is like any natural language -- i.e. super fucking dumb dumb dumb, and yet, uniquely, it lets you communicate precisely with other musicians, which is awesome.
karlgrz 671 days ago [-]
This looks super cool. I'm also a guitarist that, uh, isn't a very good drummer, heh. Will kick the tires, thanks for sharing!
(it goes at length into the algorithms, but the intro is well enough; in the end you can hear some examples too)
I second the other post recommending the Tidalcycles music livecoding language, as it uses euclidean rhythms as a base from which you can compose on. Livecoding combined with euclideans is such an interesting musical paradigm that I'd name it as one of the widest musical revelations I had.
iainctduncan 670 days ago [-]
His book is really interesting too.
sshine 670 days ago [-]
Somewhat related: A drum-machine DSL with dependent types:
Very cool! I enjoy digging into dependent typing applications.
Jeff_Brown 670 days ago [-]
Omg this is like sex on pizza.
ferrous69 670 days ago [-]
> converges over 3 bars
bars of what length? a 3 against 4 polyrhythm converges after 12 beats, so here it's 3 bars of 4 beats, which is a "bar" for the second rhythm you passed in (`'4-x'`) but four or two bars for your first rhythm (depending on if you write it 6/8 or 3/4, this one could go both ways).
Would be worth letting us know in the CLI, if you think about more esoteric polyrhythms it gets more confusing.
dredozubov 670 days ago [-]
It defaults to 4/4, unless you supply a different time signature through CLI.
Tyr42 670 days ago [-]
The example continues, and says converges after 2 bars in 3/4 time.
4/4 is the default.
sirjamespants 670 days ago [-]
This is cool!
I have a web-based polyrhythm generator as well based around Euclidean rhythms.
currently working on a v2 with a much better mobile interface and fewer clicks)
dredozubov 670 days ago [-]
I'll definitely take a look at that! I've decided against an UI for Polyrhythmix for now, as I don't have a good sense of how to make it easy to use, but retain the flexibility I can get with a DSL programmable input.
grugagag 670 days ago [-]
Nice. Looking forward for v2
moogly 671 days ago [-]
This is cool and reminds me a bit of Jens Johansson's old tool:
Another cool grid-breaking language for Polyrhythms and euclidian and beyond sequences is Nestup.
https://nestup.cutelab.nyc/
In addition to the website and github, It also has a great implementation as a Max for Live device and can drive Ableton. I’ve enjoyed it since it’s initial release.
> 32xx16xx - Kick pattern from "Bleed" by Meshuggah
I had to think about that for a bit, but yeah, that's what it is alright
dredozubov 670 days ago [-]
Glad it makes sense not only to me! I've tried to make an understandable description in a README, but if you have an idea of how to explain it better, it's very welcome.
This is super cool and I can’t wait to try it out. There’s more than one polyrhythm I’m trying to arrange, and being able to quickly hear it without having to come up with a sticking or arrangement would really help.
dredozubov 670 days ago [-]
I'd love to have some feedback from other users, let me know if you need any help!
wizzwizz4 670 days ago [-]
Your README cuts off:
> For example (3,8x(3,16x-xx(3,32xx-x)))) would read as "Three
dredozubov 670 days ago [-]
Fixed it, thanks. I'm still struggling to find words that will explain it well though, as it's still unconventional.
type0 670 days ago [-]
Anyone who's interested in synth DSL should really check out Sonic Pi, it does MIDI, polyrhythms and it's very easy to do generative sequences in it.
dredozubov 670 days ago [-]
I've been learning a lot about the other projects in the space from comments. Thanks everyone!
670 days ago [-]
mastazi 670 days ago [-]
for immediate visualisation of polyrhythms, I really liked the Buchla 252e UI with the big circle. But Buchla stuff tends to be way over my usual budgets. I wonder if there is anything like it in plug-in or Eurorack format?
KingFelix 670 days ago [-]
This is awesome, I was just asking ChatGPT if it would make me some midi files.
waffletower 671 days ago [-]
Thank you very much for sharing your code with everyone. I am very sorry for laughing really loudly and waking my dog when I discovered that it was written in Rust, instead of Python or another dynamic language. After taking a step back, I realized that I could learn a bit about Rust by looking at your code. If I found interesting ideas, they would have likely been translated into another language anyway, unless I was really lucky and you picked Clojure.
waffletower 670 days ago [-]
Can't be honest about being taken aback without getting crowd downvoted by trigger-happy Rustaceans. You don't have to be that defensive I was honestly surprised by the choice of language for the application.
nomilk 670 days ago [-]
I don't understand the basis for the grandparent comment, that is, why is the use of rust such a surprise? I only use dynamic scripting languages (so I can't speak from experience) but from what I understand rust is a great language; extremely fast and easier/safer to work with than c++. Why wouldn't it be a good choice for OP's CLI?
dredozubov 670 days ago [-]
I've been mostly doing Haskell for last 9 years, but I find Rust to be awesome nowadays. Great feedback from the type checker, no unnecessary runtime, great tooling. It's unique in a sense that it's fast, but quite safe at the same type. If it would have Higher-Kinded Types, it would be even better for me personally, but it's a tricky compromise from a compiler design perspective.
Also, I find static linking to work great with Rust, so it's quite easy to distribute your app.
The landing page: https://tidalcycles.org/
An example of some music made live with it: https://www.youtube.com/watch?v=mlUOWjC5fpY
Strudel REPL: https://strudel.tidalcycles.org/
One interesting feature of Tidalcycles is Euclidean Sequences, where various 'natural' ways of distributing X notes over Y durations are easily expressed: [1] https://tidalcycles.org/docs/reference/mini_notation/#euclid... [2] https://strudel.tidalcycles.org/learn/mini-notation#euclidia...
[1] https://soundcloud.com/lil-data [2] https://scholar.google.co.uk/citations?user=APvoBhUAAAAJ&hl=...
https://www.youtube.com/watch?v=1IzfMqs5NGw
(this set is "from scratch", meaning that it opens with an empty file and starts from there, making it clearer to understand what is going on as it builds up)
As we sit into our booth and the environment closes around use we are greeted with soft, soothing music.
As we get into conversation, the body language, verbal language, laughter and even facial expressions we express inform the mood of the room - and the music that it produces. A certain, unique-to-our-meeting melody. All of this is encoded and played back as music in real time.
Later we can use the melody to replay the mood and dialogue of the night - as everything that was said was encoded into the music heard - but may be decoded to have a recording of the conversation...
For further information, contact
@Cymatic.ai
those are some incredible tones you're working with in the video. are they being generated by the rytm or samples or something else?
TidalCycles does offer a lot of ways to control the timbre -- there are a bunch of effects, including some magical granular stuff. And merely triggering samples at sufficiently high frequencies, particularly frequencies that vary over time, can generate some cool sounds. But SC will give you much more control over that kind of thing.
TidalCycles uses a different language, does not tie you to any particular IDE, and is focused on music in particular, not audio in general.
Other cool music tools I've seen implemented in rust:
* glicol - https://glicol.org/
* tune - https://github.com/Woyten/tune
A while back I wanted to make some tools to aid in composition and was using rust. Very partially baked, but a fun pet project to learn the language with. Generates just intonation pitch lattices based on my research of Ben Johnston's compositional approach. https://github.com/jcpst/johnston
No clue what intonation pitch lattices are, but now I'm interested to learn!
I also tried making a web UI with it via Yew. I got it all compiling and running in the browser, but the crate is all about that CLI. I would have to write a lot of the code that’s in the CLI file to call the create_smf function.
It might be worth considering designing the library’s API to be a bit friendlier to an end user. I think there’s cool stuff that could be done with it. Or at least that’s something I want to do :D
It's like math notation. There is a canon of work over a very long period of time that can be used as a foundation for expressing many different intricate ideas in a compact way. And in the 20th century tons of non-traditional notation styles have been thrown into the western mix.
What I want to do is to learn a bit more about Konnakol, which is the Indian musical art expressed in percussive syllables. I have an impression that building a bridge between Konnakol and western notation can really get the creative juices flowing.
I use a eucledian pattern generator to sequence some of my drums and voices in my eurorack modular synth and it works so well
https://medium.com/code-music-noise/euclidean-rhythms-391d87...
(it goes at length into the algorithms, but the intro is well enough; in the end you can hear some examples too)
I second the other post recommending the Tidalcycles music livecoding language, as it uses euclidean rhythms as a base from which you can compose on. Livecoding combined with euclideans is such an interesting musical paradigm that I'd name it as one of the widest musical revelations I had.
https://media.ccc.de/v/456-tsh-a-dependently-timed-drum-mach...
bars of what length? a 3 against 4 polyrhythm converges after 12 beats, so here it's 3 bars of 4 beats, which is a "bar" for the second rhythm you passed in (`'4-x'`) but four or two bars for your first rhythm (depending on if you write it 6/8 or 3/4, this one could go both ways).
Would be worth letting us know in the CLI, if you think about more esoteric polyrhythms it gets more confusing.
4/4 is the default.
I have a web-based polyrhythm generator as well based around Euclidean rhythms.
https://e-drums-stg.vercel.app/
currently working on a v2 with a much better mobile interface and fewer clicks)
http://www.panix.com/~jens/polymath-old.par
In addition to the website and github, It also has a great implementation as a Max for Live device and can drive Ableton. I’ve enjoyed it since it’s initial release.
An interesting interview with the creators from MusicHackspace is here: https://www.youtube.com/live/wZeadB56YFs
Also Demetori (Touhou) is great: https://www.youtube.com/watch?v=po69XUGd2v0
https://en.wikipedia.org/wiki/Tomas_Haake
I had to think about that for a bit, but yeah, that's what it is alright
> For example (3,8x(3,16x-xx(3,32xx-x)))) would read as "Three
Also, I find static linking to work great with Rust, so it's quite easy to distribute your app.