hornc / musysim

Simulator for the early music synthesis programming language: MUSYS.
https://esolangs.org/wiki/MUSYS
GNU General Public License v3.0
7 stars 1 forks source link

To implement #5

Open hornc opened 3 years ago

hornc commented 3 years ago

Taken from not-yet-done list on #3 :

~Have not even tested multichannel output, or thought about how this will relate to stereo~ ~(something like 1,3,5 = L, 2,4,6 = R would be a default, but I have not found any documentation to say whether this is accurate)~ The six buses do not control how devices are patched together, that is separate. Buses only control how control signals are sent to the devices.

hornc commented 7 months ago

12 bit value output DONE in https://github.com/hornc/musysim/commit/58ce1043d97308886094d453d3435d28a6508ab4

hornc commented 7 months ago

Basic working data reads implemented in https://github.com/hornc/musysim/commit/697b5cca57b569a39ef65767d2d94d21541a5844

The current datafile format isn't very good. The spec doesn't really cover the exact implementation details, it was probably a binary file, but here I'm using up to 26 "paragraphs" (separated by an empty line / 2 consecutive newlines: \n\n), and the numbers are whitespace separated decimal integers that will be read and loaded to EXP as 12bit values (and most likely written out as 6bit using .).

The existing IO example https://github.com/hornc/musysim/blob/master/examples/IO-test.musys is taken from Grogono, 1973, p.378 and uses two loops to read data from an input file and populate tones for two oscillators. Currently it produces some sound using the commands, but currently mixing is not properly implemented, so the audio output is incorrect (#13 ) :

./musysim.py -i examples/sample01.data examples/IO-test.musys ; ./sofkasim.py | ny