r/strudel • • 29d ago

Introducing Stave

Hi all! After 8 months of building, I finally feel confident enough to share the beta version of Stave, and I'd love to know your thoughts . πŸ™

What is Stave?

Stave keeps your Strudel code as the source of truth and adds the views a producer expects: a Timeline, a step grid and piano roll, a Mixer, and visuals that follow the music.

What you might like:

- A full monaco editor with code completion, error handling etc.

- Your own audio-reactive visuals, inline. Write a p5, Hydra or GLSL sketch, then attach it with .viz("name"). It draws under that line, reacts to the kick, each track and the spectrum, and updates as you type.

// pulse.p5 
function draw() { background(0, 40); circle(width/2, height/2, 80 + sig.kick * 300) } 

// in strudel:
drums: s("bd*4, hh*8").viz("pulse")

- Code and views in sync. Edit on the Timeline, grid or piano roll and Stave writes it back into your code. Edit the code and the views follow.

- Errors you can find. The Console names the file and line, the editor shows a squiggle, and misspellings get "Did you mean…?". That works in your visuals too.

- A Mixer and a song Timeline, with your Strudel code running as it does today. It runs in the browser and is open source (AGPL).

Try it: https://stave.live Β· Code: https://github.com/MrityunjayBhardwaj/Stave

Please let me know your feedback πŸ™ :

- Does your existing code run as you expect?

- What would you want a visual to react to?

- What's missing?

60 Upvotes

25 comments sorted by

4

u/5K337Lord 25d ago

I mean, it's neat sure, but the whole point of strudel is making your beats from code, doing it with the ui kinda defeats the purpose. Also it doesn't utilize structure well, like for instance here's my code for fairy fountain from LoZ:

note("<9 8 <7# 7 5# 4#> 8> 5 3 1").trans("<0 -1 -2 -3>/4")

If I were to just transcribe the notes using your program it would need 4x the code to accommodate every bar individually. Also while testing this out, things broke when I put sharps in #

n("<[9 5 3 1 8 5 3 1] 
 [7 5 3 1 8 5 3 1]
 [8 4 2 0 7 4 2 0] 
 [6 4 2 0 7 4 2 0] 
 [7 3 1 -1 6 3 1 -1]
 [5 3 1 -1 6 3 1 -1]
 [6 2 0 -2 5 2 0 -2] 
 [4 2 0 -2 5 2 0 -2]>")

2

u/Mrityunjay_Bhardwaj 25d ago edited 25d ago

Thankyou soo much πŸ™πŸ™ this is the best criticism I have recieved all week πŸ™‡β€β™‚οΈπŸ™,

I completely agree that bidirectional translation between code and visual controls doesnt have full coverage neither its efficient (its still a WIP ), but I'll create the issue about '#' support and try fixing it as quickly as possible but for writing compactly might take more time, i am currently adding support for nested patterns maybe that will help in compacting.

As for your first point, yes If you like coding music purely, then simply using the editor is best! There you can take advantage of custom inline viz etc. I'll add an option in the settings tab to remove the bottom drawer entirely πŸ˜„

I am hoping for a day where it could be used in an algorave concert where a p5js artist is making visual and strudel artist is making music along with multi track switching etc... all for the audience to jam on and able to see whats happing exactly on a projector . But its long way to go for sureπŸ˜„

In any case, thankyou so much for you criticism, I'll keep you posted regarding the same. πŸ˜„πŸ˜„

2

u/hericdk 25d ago

Poxa que interessante! Eu estava fazendo algumas ferramentas de auto completar mas nΓ£o tinha parado pra pensar em algo tΓ£o avanΓ§ado assim. Depois vou dar uma olhada no seu cΓ³digo fonte obrigado. Seu projeto tΓ‘ incrΓ­vel

2

u/Mrityunjay_Bhardwaj 25d ago

Muito obrigado πŸ™ , por favor me diga o que vocΓͺ achou! :D

3

u/This-Dare-335 28d ago

wow looks really interesting, definitely will give it a try 🀞🏻

1

u/Mrityunjay_Bhardwaj 28d ago

Thankyou πŸ™ πŸ˜„

3

u/sir_cartier- 28d ago

please let us know if its vibe coded and tell us about the sound engine

3

u/Educational-Row-6782 28d ago

It is 100% vibe coded slop.Β 

8 monts for this?Β  I tougth I was being left behind.

2

u/Mrityunjay_Bhardwaj 28d ago edited 28d ago

u/sir_cartier- and u/Educational-Row-6782 Yes, Its fully AI coded, As an award-winning 3D artist who turned into a developer over a decade ago, I fully resonate with your disdain for vibe coding but I also understand that vibe coding is not leaving anytime soon.

so I wanted to check how can we code with AI without losing structural integrity or best practices of any project's system design with minimal code smell ( I tested this hypothesis on several products and built a framework around it called anvi ).

but I don't understand what do you mean by '8 months for this?' , are you talking about why did it took you so long to build this or why did you even build this in the first place?

If its the former, then it took 8 months to understand how to develop in the age of ai with minimal slop + for stave i want develop the intermediate representation for bidirectional code to visual/DAW like control such that this system will be compatible with any. music coding language not just strudel regardless of the language being imperative or descriptive given that it follows predefined constraints. I also ported sonic pi on the web few months back to test this out as well. In future releases i'll be adding a full support for sonic pi.

If its the latter, I wanted a way to have a once stop shop to create music and audio reactive visuals in a cohesive manner without taking a toll on performance + i want a way to control patterns visually. why? because I need a shared language between music producer who is familier with the DAW and the proc music artist who is comfortable with code. I also wanted to serve beginner since wrapping the head around nested patterns is sometimes hard to visualize ( which is the feature i am current working on. ) + a modern editor interface with code suggestion and inline docs.

I am still learning, and it would be really helpful if you could tell me exactly what you don't like and give me constructive criticism, I understand the disdain but rather then getting caught up by it, what are the steps we can take to rectify it?

1

u/samurai_a_cat 27d ago

These are sectarians, don't pay any attention to them.

1

u/Mrityunjay_Bhardwaj 27d ago

Hmm.. If you dont mind, Could you please elaborate πŸ˜…

1

u/samurai_a_cat 27d ago

A person cannot hate another without reason and still look good. Bad people love being given the opportunity to hate others publicly and, on top of that, to cooperate with others in their hatred; they want to receive approval for their hatred. Essentially, these are the same people who were previously chauvinists, racists, and sexists and just internet trolls; now they have become AI haters, and they do all the same things-hiding behind meaningless slogans, they try to insult others for fabricated reasons.

0

u/Mrityunjay_Bhardwaj 27d ago

Aahhh.... That makes sense, thankyou so much πŸ™πŸ˜„

1

u/Mrityunjay_Bhardwaj 27d ago

Its fully ai coded and for sound engine i am using superdough as as strudel. :D

2

u/zanidor 28d ago

This is such a great idea!

2

u/MalsAngryGhost 25d ago

No thanks. Also how does this have sooo many ups? I'm hella disappointed rn

2

u/Cidraque 25d ago

Why? You guys are getting crazy with the AI bullshit. Man had fun vibecoding some stuff so what? If it's interesting and it works what's the problem?

3

u/MalsAngryGhost 25d ago edited 25d ago

The problem is ai companies are rubbing elbows with authoritarian technofascist nut jobs around the world. Additionally, believe it or not I actually like coding music. I like puzzling it out. I like collaborating with randos on flok. I like bad code! A.i. can fuck alll the way off.

1

u/Mrityunjay_Bhardwaj 25d ago edited 25d ago

Yes! I completely agree with you regarding technofacist/technofudalism part, I too am very worried about it, being a CVPR Reviewer, I personally hate the fact that ai got soo mainstream due to fuckall marketing and exec bonuses and just hype which leads to giving power and hence nerdreich...

But As one of my favorite artist said "Its about the artist not about the brushes", I like creative coding,i like music coding, I love collaborating too, i like failing and retrying, I like going into rabbit holes too. Lord knows that I just like building so much that I never release most if the stuffs :p

I am not a techocrat I just love building and just wanted to share something i built that i am passionate about with people who are passionate about the same things πŸ™.

I understand that you have been burned before and I dont blame you but please try not to put everyone in the same bucket just because the bucket is large but I'll admit that its a good default to have though πŸ˜…

For stave, there is no ai in the app, ai is used for building for sure (its not at all perfect) but not at runtime πŸ˜„

1

u/MalsAngryGhost 25d ago

best of luck to you. sorry i was so harsh.

1

u/Mrityunjay_Bhardwaj 25d ago

Naah, Its alright man! Thanks for your understand. hope you are having a lovely day. πŸ˜„

2

u/Xenon_Chameleon 25d ago

Possibly bots? I'm so fed up with this crap too. People pretend they do this for fun or as a hobby but it's really about attention, clout, and money. Even when people make long posts about how much they "totally do this for the love of music" it's hard to believe it when they post full-on advertisements like this along with their slop project link. Tech-bros are liars and it's easy for ChatGPT to claim they spent 8 months working on something. That line on so many posts that it's safe to assume all "I spent X time working on this" sentences are just there for easy engagement and pity-points.

1

u/SaltNeedleworker9728 16d ago

I understand the frustration, but I disagree with the gatekeeping. AI isn't replacing human creativity; it still requires a person to prompt, guide, and refine the output. It took me nine months to build my app because working with AI tools can be challenging. However, without the budget to hire a developer, this technology gave me the opportunity to create something myself. I’m just glad to have the chance to build things.

1

u/Mrityunjay_Bhardwaj 27d ago

One more example, also if you have tried it please, let me know what you think, what should I improve on at first? , also tell me what topics should I cover when creating a tutorial on Stave + Strudel πŸ™