Hacker News new | comments | show | ask | jobs | submit login
The sound of space-filling curves (tue.nl)
109 points by rrherr 11 months ago | hide | past | web | favorite | 21 comments



I'll admit that I went to the page skeptical, expecting another "let's see how some arbitrary mathematical function turned into a song sounds," but I was pleasantly surprised that some of these sound decent.

It makes me wonder: what if we take existing songs, try to find space-filling curves that explain them, and then look for different paths through those curves? In other words: would it be easy / possible to parameterize existing songs as curves, so that we can find which subset of the space of space-filling curves is actually interesting to human ears?


I wish this was interactive; I'd love to follow the dots and watch the keys be depressed.


Well that's interesting. The fast-playing 2d curve (the fourth audio file, under "Meander fast track") sounds a lot like a solo, a taksim, in an oriental scale - Ussak, perhaps, or Segah, although the tuning is western. It's like music made out of a heavily stylised and simplified arabesque. So cool.


It would be an incredibly great visualization to show a dot moving around reflecting your current position in the curve in the first picture.


To me the most impressive is the sample in the "Sampling at square centre points and connecting points" section.


Agreed. It seemed to even follow true chord changes instead of just bouncing around.


The synth cutting off and glitching are so irritating! Seems like a lot of work to put into something to leave really jarring artifacts all over. If you ever create or edit audio, all tracks and samples should start and end on the zero crossing. Otherwise the jump "back" to zero introduces lots of noise. Sticks out like a sore thumb on a spectograph


Reminds me of the postscript to this Ben Krasnow video (from about 13:45) which discusses an analogous effect in a circuit using a capacitor. https://youtu.be/xyMH8wKK-Ag


interesting.

on the same topic, i been also curious of something and wonder if anyone have the answer to this.

lets say i have a track playing just one note (to be specific, a frequency measured in hertz, lets say 528) for one minute and we want this to be as pure sounding as possible.

what is the best approach to do this?

in addition, if the audio file is in WAV and we convert them to mp3, do we still lose a lot of quality even though we are just playing same note for 1 minute?

how cam we achieve playing the purest sound without music file taking up too much space?


In theory, an 1056 Hz 8-bit WAV file filled with alternating +127 and -127 samples will perfectly reproduce a 528 Hz tone. That's about 60kB in size, and a traditional LZW compression (I.e. Zip) will work quite well due to the repetition.


Wouldn’t that likely end up as a sawtooth pattern at the speaker and thus introduce a number of harmonics?


Not if the sound driver is doing its job properly -- it's generally bad form to add harmonics above the Nyquist frequency[1] of the input file. If you do have to deal with a buggy sound driver, you can use any small multiple of the tone frequency as your sampling rate and still have efficient LZW compression.

[1] https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampli...


Well I'll be...TIL - https://imgur.com/a/vr580

Actual sawtooth on the left (done at higher bit rate), tone on right is 2khz tone at 8khz sample rate (audacity won't generate tone right at nyquist). Looks like a triangle wave in audacity, but the tone is fairly pure with just a whisper of harmonics, and those are probably from the speaker.


Check out this video, it addresses that, also it's an amazing video, skilled presentation etc: https://xiph.org/video/vid2.shtml

(tldw: the answer is no, like the other commenter said, if the D/A converter is working properly)


re: pure sounding. make sure track starts and ends on zero crossing, or add volume ramping. Otherwise click on discontinuity will be very non-pure.


Most compact option would probably be a function generator feeding samples to the audio device.


Am I crazy or does this music sound Baroque/like Bach's music?


Not at all! Two independent voices, stepwise motion — it’s almost counterpoint. https://en.m.wikipedia.org/wiki/Counterpoint


It seems to share some of the complexity of that kind of music.

I wonder if space-filling curves tap into the same complexity as a classically-structured fugue in some kind of deep way.


Looking forward for the inverse thing - convert Bach music into curves


That won't be possible given the current mapping procedure. It imposes a certain set of constraints on the space of possible tunes that are not obeyed by any of Bach's works: A fixed number of voices (number of notes that can be played simultaneously), greater than 1, with all voices always playing some note (i.e., there are no rests).

If a piece of music does not obey those constraints, it cannot be back-transformed into a continuous curve in a fixed number of dimensions. You would need to come up with some other, more complex, method of mapping curves to music in order to handle arbitrary musical compositions.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: