Noisefunge: A music programming environment in Befunge
github.com
github.com
Orca cleverly avoided this issue by making every instruction running simultaneously. If I understood correctly, NoiseFunge seems to found another solution out: it queues notes to play by the next beat and moves on. As I'm not really a live coding person I can't see this approach is easier than Orca or not though. Anyway, an interesting attempt indeed.
If you're interested in seeing it in action, here's a recent video (there are more on my youtube page): https://www.youtube.com/watch?v=qeseWGmcIbY
Mostly, I'm just sticking with the Rust implementation now because it has a couple of new features that I wanted. Also, it should theoretically (I have not tested) be able to run on other OSes, since it is built around JACK instead of ALSA.
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.
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.
Complete with its own rust based Befunge compiler.
Keep on the algorhythm <3
(I have hacked together scripts in python for a few incomplete compositions and experiments with harmony. I even make the samples from scratch using basic math and waveforms -- I encourage you to try deriving the raw samples as well! waveform shape and phase interactions are surprisingly complex)
https://github.com/revnull/noisefunge.rs/blob/master/src/fun...