Logisim MIDI
Logisim-Evolution does not have built-in support for audio output. To make circuits that generate audio output in Logisim, you can use this MIDI Library for Logisim:
The first file is a "jar library". Download it and put it in the same folder as your ".circ" files. Note: this jar library is actual java code, so as with all programs you find online, you should only download it if you trust the source (kwalsh is providing this, and I have reviewed and modified the code, but credit goes to kahdeg for the original implementation). You will probably get a security warning from your browser or operating system about downloading untrusted "jar" libraries. This library has been tested on Linux and Windows 10. Let me know if you have trouble on Mac. My Windows 10 laptop seems a bit laggy and slow, though it does work.
The second file is a demonstration circuit using the MIDI output. Put it in the same folder as the jar library. You can see (and listen to!) the demo in action. Turn up your volume... sorry about the low audio levels on the recording. This circuit has two ROMs, two counters, and two MIDI devices. This generates and plays two independent sequences of notes simultaneously (one for left channel, one for right channel). The counters are used to fetch data from the ROMs, one location after another. Each value stored in the ROM encodes a quintuplet of values: an OnOff signal the note pitch, the not "velocity" (how sharp/loud the note is), and a timestamp. There is also a master counter at the far left. Whenever the master counter value exceeds the timestamp in the ROM location, the counter increments to the next location in the ROM so that the next note gets played.
MIDI can be a bit confusing. The basic idea is that MIDI outputs simulate a virtual piano-style keyboard or synthesizer. Each note (represented by a number between 0 and 127) can be pressed with a certain velocity (between 1 and 127). Higher velocity means possibly louder and possibly longer duration. Lower velocity means maybe quieter and maybe shorter. To "release" a note, you play that note with velocity 0. You can play multiple notes at a time (a chord) by just sending multiple (note, velocity) pairs to the output one right after the other. The note might not go quiet immediately when you release it, it might instead linger for a short time. Note: I say "maybe" in the above description, because you can use different instruments, and the velocity numbers mean different things on different instruments. An techno-electric synth instrument might ignore the velocity and keep making noise indefinitely until you release the note, at which point the noise stops instantly. A harp instrument might make a louder or softer "pluck" depending on the velocity, which then decays slowly regardless of whether you release the note.
In Logisim, go to Project :: Load Library :: JAR Library, and select the midi-ev.jar file. You should now see a new "kahdeg MIDI" folder in the components panel. Within the kahdeg folder is a single component named "MIDI output". It looks like this:
The inputs are (from top to bottom):
You can leave the channel number and instrument inputs disconnected, and instead set those values using the "attributes" panel.
Every time any of the inputs change, a new note will be played based on the current inputs: If Damper=1, all currently-pressed notes on this channel get relased. Then, if the instrument has changed, a new instrument will be loaded for this channel. If velocity is zero, then the given note will be released, otherwise the given note will be pressed with the given velocity.
Because the above happens every time any input changes (and also sometimes randomly when you edit your circuit), it is a good idea to devise a circuit that can send a complete set inputs to the MIDI output all all at once. If you change the note, then the velocity, you will hear two separate notes played one after the other. If your circuit changes the note, velocity, and other inputs all at once, you will hear a single note using those new inputs values.