Live data from Hacker News

Show HN: Wave function collapse algorithm

github.com

41–50 of 127 posts

Re: Show HN: Wave function collapse algorithm

#41

Mindblowing... could this technique also be applied to music?

I doubt it, because music is 1-dimensional and for 1-dimensional arrays WFC is just a Markov chain.

There are three-dimensional views of music, e.g. time-frequency-amplitude. See https://en.wikipedia.org/wiki/Spectrogram

Re: Show HN: Wave function collapse algorithm

#43

Earlier quoted context omitted.

I doubt it, because music is 1-dimensional and for 1-dimensional arrays WFC is just a Markov chain.

How is music 1-dimensional?

A microphone records amplitude of sound waves over time, i.e. the air pressure -- that's the dimension.

Re: Show HN: Wave function collapse algorithm

#45

Great work! The fact that it captures "long-range order" seemingly perfectly is something not many have been able to do before! And the "collapse" visualization is great fun to watch. But is your algorithm really qualitatively all that different from previous search methods (e.g. Efros and Leung), if you are still (uniform random?) sampling over the input distribution of patches? I notice also your input textures ten…

Thanks! Efros' and Leung's method doesn't satisfy the (C1) condition. The closest previous work is Paul Merrel's model synthesis. WFC and texture synthesis serve similar purposes: they produce images similar to the input image. However, the definition of what is "similar" is different in each case. If you have a high def input with noise (like realistic rocks and clouds) then you really want to to use texture synthes…

predating Efros & Leung by many years: http://draves.org/fuse/

Re: Show HN: Wave function collapse algorithm

#49

Earlier quoted context omitted.

How is music 1-dimensional?

A microphone records amplitude of sound waves over time, i.e. the air pressure -- that's the dimension.

You can also view digital images as 1-dimensional arrays of bits. (This is roughly how fax machines work.) That doesn't mean they can't also be 2-dimensional images, or representations of 3-dimensional images, or indeed an encoding of a 3D scene directly.

Similarly, you can unpack a linear sequence of sound samples into a two-dimensional plot of frequency and amplitude with a fourier transform.

Re: Show HN: Wave function collapse algorithm

#50
post #49

Earlier quoted context omitted.

A microphone records amplitude of sound waves over time, i.e. the air pressure -- that's the dimension.

You can also view digital images as 1-dimensional arrays of bits. (This is roughly how fax machines work.) That doesn't mean they can't also be 2-dimensional images, or representations of 3-dimensional images, or indeed an encoding of a 3D scene directly. Similarly, you can unpack a linear sequence of sound samples into a two-dimensional plot of frequency and amplitude with a fourier transform.

Or you can represent the music as instructions to performers or synthesizers (ie notation) and you've got as many dimensions as you want.

Music is not sound, it's made of sounds. The fact that it gets mixed down to a single waveform when you consume it, either in the studio or when it hits your ear, isnt particularly relevant to how its made. I suppose the same is true of images though.

Markov chains applied to midi have been able to make "locally similar" stuff since forever. I wonder how this algorithm could be applied to higher-order aspects of music notation.

Post reply on HN