Remix.run Logo
errozero 6 days ago

Hey, I made this a few years ago. I'm suprised to see it posted here today.

It was never finished and I was meaning to add a polyfill for the missing cancelAndHoldAtTime function for Firefox.

Edit: I've just hacked in a quick polyfill

padenot 6 days ago | parent | next [-]

Sorry, I'll implement it, I had forgotten we didn't do it for erm... 9 years.

https://bugzilla.mozilla.org/show_bug.cgi?id=1308431

strogonoff 5 days ago | parent | next [-]

For a while I have been curious about the intended uses for xAtTime functions (like cancelAndHoldAtTime) in Web Audio. As far as I understand it, calls to them suffer from lag due to main JavaScript thread and audio thread communication, which makes sample precision unachievable—and precision is quite important in music.

Is it mostly for emulating slow-moving changes on fixed timelines, a la automation tracks in traditional DAWs like Logic and Ableton? Is design rationale documented somewhere?

padenot 5 days ago | parent [-]

Those methods are sub-sample accurate, granted you call them a bit in advance to account for the cross-thread communication, as you say. But yes, in general this was designed (prior to me becoming an editor) with scheduling in mind, not with low-latency interactivity. That said, it goes quite far.

Other systems go further, such as Web Audio Modules (that builds on top of AudioWorklet) implement sample-accurate parameter change from within the rendering thread, using wait-free ring-buffers. That requires `SharedArrayBuffer` but works great, and is the lowest latency possible (since it uses atomic loads and stores from e.g. the main thread to the rendering thread).

SubiculumCode 6 days ago | parent | prev | next [-]

This is the best thread

chr15m 6 days ago | parent | prev [-]

Thank you!

circadian 6 days ago | parent | prev | next [-]

This is really lush. Instantly it brightened up my evening. This kind of experimentation is always amazing to see.

As many seem to have mentioned below, it brings back memories of Rebirth in some ways. What it also reminds me of is the beautiful results you could have by plugging some simple modules together to create soundscapes. The limits are the things that provide some semblance of freedom and this is no different. Greetings from a fellow UK acid (techno) head! :P

errozero 6 days ago | parent | prev | next [-]

I've just updated this to make it a little bit easier to use on a phone. The knobs are now a bit chunkier and should respond better to touch and the instruments sit vertically instead of horizontally.

ankitg12 5 days ago | parent | prev | next [-]

I was randomly going over my past HN activity and bumped over this gem from here https://news.ycombinator.com/item?id=38624968 and posted :)

errozero 5 days ago | parent [-]

Ah, I was wondering how it ended up posted here. Thanks!

zote 5 days ago | parent [-]

this brought a little more joy to my day, thank you

obiefernandez 6 days ago | parent | prev | next [-]

Hey if you don't mind updating this, can you please allow the tempo to be as high as 150 bpm?

errozero 6 days ago | parent | next [-]

Hey, sure! I forgot it was limited to 130, it's been a few years! I've just updated it.

radley 6 days ago | parent | prev | next [-]

That might tickle your tinrib. If you want to stay up forever, maybe go to 160 bpm. Or even some industrial strength 200 bpm.

diggan 6 days ago | parent | prev [-]

And also, different tempos per instrument :)

6 days ago | parent | prev | next [-]
[deleted]
stephenhandley 6 days ago | parent | prev | next [-]

this is awesome. would suggest not randomizing the tempo on regenerate, and if it was already playing, when hitting regenerate, keep it playing. that would make it easy to quickly audition loops at a given tempo with a single click

elevaet 5 days ago | parent | prev | next [-]

@errorzero - if you have the time would you be able to give more information on the Scales? This section is very interesting.

errozero 4 days ago | parent [-]

Hey, the scales are just an array of numbers like this

    ['Darkness', [0, 1, 3]],
    ['Darkness2', [0, 1]],
    ['Single', [3]],
    ['Locrian', [0, 1, 3, 5, 6, 8, 10]],
    ['Aeolian', [0, 2, 3, 5, 7, 8, 10]],
    ['Mixolydian', [0, 2, 4, 5, 7, 9, 10]],
    ...
A scale is randomly selected at the start and then notes are randomly selected from that scale in the pattern generation, plus the root note number is added to each one.

So if you had the 'Darkness' scale selected and had the root dropdown set to 0, the notes in this scale would be C, C#, D# which is 0, 1, 3 if you count the keys on a keyboard. If you changed the root to 2, then it would become D, D#, F (2, 3, 5).

Hope that makes sense.

elevaet 3 days ago | parent [-]

That does make sense, thanks! Very simple and effective.

elevaet 6 days ago | parent | prev | next [-]

This is fantastic errozero nicely done! It's very musical, the drone is a nice touch and really glues it all together in a subtle way.

5 days ago | parent | prev | next [-]
[deleted]
blackhaz 6 days ago | parent | prev | next [-]

This is amazing. Thanks for making it.

Computer0 6 days ago | parent | prev | next [-]

Are you interested in open sourcing? I'd love to learn about how this was done.

errozero 4 days ago | parent | prev | next [-]

Update: The wav export feature now renders with all parameter changes, and I've fixed a bug that excluded the drone from the export.

djmips 6 days ago | parent | prev | next [-]

How do I export/save a pattern I like?

errozero 6 days ago | parent | next [-]

Currently, all you can do is save the url which contains all of the initial randomisation settings when a pattern generates. It doesn't update when moving sliders or anything, it's just the intial settings.

I'll look into adding a wav export feature.

_HMCB_ 6 days ago | parent [-]

Yes. Export please!

errozero 5 days ago | parent | prev [-]

It now has a simple wav export feature. Details here: https://news.ycombinator.com/item?id=44824142

errozero 5 days ago | parent | prev | next [-]

Update: wav export now added

jackdawipper 6 days ago | parent | prev [-]

this thing is great. you got a version that can run as a vst or plugin?