4 ms·
Ahh, this reminds me of my own attempt in Brainfuck! http://nexuist.github.io/brainsynth/ http://nexuist.github.io/brainsynth/ Been a year or two since I touc
by nexuist 6y ago
Ahh, this reminds me of my own attempt in Brainfuck!
http://nexuist.github.io/brainsynth/ http://nexuist.github.io/brainsynth/
Been a year or two since I touched it, so I have no idea if it still works. Last I remember it was extremely slow; I think eventually I wanted to rewrite it in Vue or Svelte or even WebAssembly.
I think it's a fun concept, just need to work on the execution to make it painless to play with.
- gnramires 6y agoHey, that's very nice. I think obfuscated languages (esolangs) lend themselves really well to this, because while doing seemingly trivial "logic" is quite difficult, creating algorithmic patterns and structures is not -- i.e. it's difficult to "steer" the structure in a canonical one but easy to get repetition, patterns and progression, which lends itself very well to art (and perhaps genetic programming as well? but that's a story for another time). Just a heads up: 1 ) your synth seems out of tune (in particular the 'Octave', when selecting 'all notes' you have a chromatic progression, i.e. all notes seem to be 1/2 tone apart). I don't have a well trained ear, but most notes seem off, e.g. C4 to D4 doesn't seem like a whole tone. The way scales work is quite simple for (approximate) equal temperament: each note in a chromatic scale (that includes all notes) should be 2^(1/12) the frequency of the previous ones (called a semitone interval). 2 ) What you have there is not a "valid" octave either :) An octave in western music is usually played using either of two patterns of notes: a) a major scale, or b) a minor scale (there are other scales as well, less used). The most "obvious" choice is to start with a major scale (which generally has a positive-ish mood). Each scale has a fixed interval pattern which sets its mood. What's confusing is that the letters A,B,...,G, don't correspond to whole tones (two semitones, or 2^(2/12)) apart. The letters were assigned on the basis of a specific scale, the C major scale. The full scale (chromatic scale) composing all notes starting at A therefore isn't either A,B,...,G or A,Bb,B,Cb,C,...Gb,G (a flat represents a semitone below a note). That's because the major scale has a pattern of Tone,Tone,Semitone,Tone,Tone,Tone,Semitone (completing an octave, 2x the frequency).[1] The C major scale is simply (starting at C) C,D,E,F,G,A,B,C. This means there are half-tones between E and F, and between B and C. To build a A major scale, you get: A, B, C#, D, E, F#, G#, A. (sharps and flats are equivalent in alphabetic order, except for the E/F and B/C intervals, where E# = F != Fb and B# = C != Cb), and finally the names on the chromatic scale are A,Bb,B,C,Db,D,Eb,E,F,Gb,G,Ab (start anywhere in order), all a semitone apart. As for frequency naming, the convention is that A4 = 440Hz (in modern orchestra), so A3 = 220Hz, A5 = 880Hz, etc. (this is the fundamental frequency). The rest I leave up you :) Hope this was useful and not some confusion of mine or minor technical quirk! [1] This tone/semitone pattern is a bit complicated for a compact explanation, although I think you can find online (I intend to write an accessible blog post about it sometime...) -- it has to do with how our ears identify overtones and we find matching (integer-related) overtones aesthetically pleasing/attractive.
- nexuist 6y agoThank you for the advice! I'm not a musical person at all; I will try to remember to get to this whenever I get back to this project!