Open labbo-lab opened 1 year ago
My proposal is a set of file formats that are human readable, along with a way to manually edit each format with (some) ease
I'll slowly be working out the details for some, the ones i currently want to focus on are:
First off, MIDI-like, because that should hopefully be the most simple
File Ext: .CHRP
We only need one instrument, chrip
, as other instruments are a complicated relic of archaic music genres so that removes a decent amount of complexity (With MIDI having 127 unnecessary instruments)
NOTE (note text)
BPM (integer)
INST "Chirp" //There are no other instruments, this is just a formality for new compilers to make it easier for them
CMD start // Starts the melody (Future commands can be added)
CHIRP (Start), (End) (-/+) (Offset from Middle C)(Volume percentage)% // Can be overlapped, order in doesn't matter
CHIRP 1,4-1 // Whitespace doesn't matter either, as long as you have at least 1 space
CMD end // Ends the melody
NOTE Settings
BPM 132
INST "Chirp"
CMD start
NOTE Main Melody!
CHIRP 0, 2 + 1 100%
CHIRP 2, 3 - 5 90%
CHIRP 4, 5.5 + 0 100%
NOTE Background Bass!
CHIRP 1, 6 - 10 65%
CMD end
First off, MIDI-like, because that should hopefully be the most simple
It in fact, was not simple. (Yet not too hard)
Any feedback before i continue on to the next formats?
Can't we just convert any graphics to colored ASCII art?
Can't we just convert any graphics to colored ASCII art?
This would require a way to type with color (again, manual creation/editing is a big part of this proposal) , which should absolutely be a standard however most keyboards currently don't support that
There's ANSI escape codes, allowing colored terminal output.
There's ANSI escape codes, allowing colored terminal output.
This could work, however its not quite as fun ¯\_(ツ)_/¯
next up, image format!
File Ext: .BERD
BERD (Bitmap Ergonomic Raster Drawing1 ) is an image format for storing images efficiently (sometimes)
(assignment value, 1 character or more) (hex color with opacity) //can be repeated as many times as you want, creating a "palette"
(optional width value)x(optional height value)
(assignment value) // repeat along x or y axis, or if you defined a width and height you can write it all on one line if you want
w ffffffff
b 000000ff
w w w w w
w b w b w
w w w w w
b w w w b
w b b b w
would give (upscaled for visibility)
or you could do
w ffffffff
b 000000ff
5x5
w w w w w w b w b w w w w w w b w w w b w b b b w
A better way to implement transparency could be useful, as antialiased edges would create a lot of unnecessary assignments
1 Make a better acronym
Well, now I need to make audio... I am actually dreading this one a bit, although I do have a bit of an idea of what to do
What about storing FFT values? This way, you can do frequency analysis for free.
What about storing FFT values? This way, you can do frequency analysis for free.
That would be interesting, but looking into FTT (Fast Fourier Transform), it doesn't fit in the whole "Human editable and readable" part, and also I just don't really understand it enough myself to create a file format with it 😅
Ok i got two audio formats to work on, one suggested by Lu (TodePond) thats basically ascii art for waveforms and my idea which is more like the .CHRP
file format
(Im going to work on Lu's suggestion first because its more interesting)
(Im going to work on Lu's suggestion first because its more interesting)
Now i could make it just
** **
* * * *
* * * *
* ** *
but thats boring, so i think im going to do something like
|\ |\ |\
| \ | \ | \
| \| \| \
ok, so you can decide how much detail you want in the wave form, so if you want an easy square wave, just do detail 1
and then
#########
or a sine wave with lots of complexity
. .*``*.
'._.' '
(Each character would have 2 values, a start height and an end height, for example / could be 0 and 1, and a
*` would be 0.75 and 1 (just making guesses/examples, this probably isnt accurate at all)
So it's not lossless?
So it's not lossless?
Its only as lossless as you make it, with the detail feature i guess you could control it
https://universeodon.com/@Jax_/110577633620604516
Set up a poll to figure out what monospace font people use the most
working on a way to parse .CHRP
files
:tada: Parser for .CHRP
files has been finished! It currently just converts it to MIDI, however I will eventually make an actual way for it to play notes
https://replit.com/@LabboLab/CHRP-to-MIDI?v=1#song.chrp https://onlinesequencer.net/3474781
Not Very Professional Proposal:
Human Friendly File Formats
While DreamBerd already supports files, along with file names within a single file, however as it stands, most non-text file formats commonly used would be an eyesore when used in this way:
a standard .png file as text
``` ======= w3c_home.png ======= �PNG IHDRH0=���gAMA���a�IDATx��Z}lSU?1{�t3�b�(��n "a4iX��j��8���1Jg��8�Q�3tQ�(h ��C�K ^��R���B��M�&nC�no��hGX�_�ǹ�����s��W�G����=h&�?h& �,�'��,�"a``�d2�L�G�c,˚L&$oذ��8��`��Gmm���X~~~(���GG�!�����l64�3���p�o!��pN�"m*u�`��[<4��O:}���!9���3����Ce�q\NN�V�eY�f�i�Z��؍`x���5���Σn���| [w���6���?�o� o�q\uuuKK�0EEEv�]�ѠS<����.8s��q�W<��ڵ����N(��i3�S��u�>8[���2�~쑱��=VB8����ܖ��D"����r:��l]]��˗��� ˲,�644TVV*�X履���HNM�r��T��M�ޣ��g�����+Rfm��������W���_�9�����loo����f͊D"���F�QT-�<��fc9:2�j/Ϟ���P�F0,e�9P���^��a6��4���jjj"�\�~]J-F̠W��v��U��:�<4KD�`����Í+������U+H����]N����u:���ۭV�J�����}���x��A�CD_�"m�������!����?��ۋ)���/`95e ����������յcǎ�{�vvv���&HEE�B�5(b�C�{y�H�=# �m?���a�Ix��i*��or for audio files:
(truncated for brevity) ```----- sample-3s ----- ID3#TSSELavf57.83.100��PInfo|�B #&(*.0248:<>BDFHKOQSUY[]_ceginprtxz|~��������������������������������������������������Lavc57.10$@�B^P�X���d;#�0� ���Y���4�<�C`LG?��R�,YK�!���dɧv@�w��0���@�9 B ����X>���0}�� `�>���!���A�@�>���h $�����,�`"���x�������4(1���>����;��L�s�b�!䆠�"��hԓ�&�Gk���� P[�g'�/��d��*��W\�-/�+z�I[4���'��[�fh����8�7Ƶӌ���f,!*�l�vI�������\�[����Yq z�� G�����?�lE��m�����Z�wLÚI�����0������R �f&�a˹�e�I�jKs�K���� @D�� 0XhxA�Q�-I�J ]��Vb⢮���d ��`V�i ��_X�UH4��#l���J�F���AbŊ�������MSwKSj����|\F�4����w����|���R�cw, F+���2t[k0R�z��\���k՞��KR���µC���Ұ�4����7F�%������u�+���`�v�Δ.�Hb� �;g!{j�[w�v����$"x)�-�Z�E��~�x�^O��8\��FLT)T9b|ĥG�����>��[!h�R�2��� UJo9=Q�8ב�e��5-��vB��ӟ�h� �fpC���bC����u&0��jfJut;QJl�u,`d@Pd ��]�R���E� E�~��+�Ãt���Q��Xe�s�ʹ~@D���7Qr��������dc���B��)� mT-��4����5B)]�?�ٵ�1�b��[N���fв��b��̨��$�äR��ޅEikW��A��yV�2e+�� �N �{͐� �1i^��+�WU�Tuh�pz���%P������p`D�?����ۥm��C��KhYu����fY�-��rR��r��x s��k)r�Co�xõK\�^�[��F:ϯ��U��-w�K���/yx��O���=&*r%���%-��eF}�Cm� ���F�A��5����{��f�[u&h`��[���r��_��;�����~�ww��s_�b�����JLAME3.100������������������NJ����N< ^q���!�X���K�8i����n0%$a�r�اT�g����E��H�J_Lv���d���AԳOB� @�X̰�4�k�'�Y�I��O7�S�~��`��ܾ����R�AH��:��N37y���W����Ms�kZ�Ng�ƐmC�x��/-x�� )ַPAl�+!�/�rni��E�'� a�q��j���do}ި�x�ä�q�5!a�i&`8y��r�Df��s%<���\��[�B���R� �{V$P� �� �(EiP�BQ� �#X;4�d��&dX�*k�C�,�g(�5Ҕ�-y�b�#Vr͵=Jp��i���Rc>LAME3.100�����a�ހM�P0 �Ȭh"J��Q#��0��$2&��EYC_Z��0J�hՔ ):Ȋ�� Mǵ�O�mK���O�V܊xkm��*R��9��$�"���������d��vER�l5� ��I-�@4����(ʺc���SW\�����Cl�'��$�w�u���]�T���UC�x�w����u����������9�z��������ȸ�щ��0��[0дr���x�&8 �I� r����q-V8@J�Q��P\��иY���8�2�k ��ve���D��7�i��8���+��i����L�_�}V�}�� 8B8�d��������2�K94�O�/�M�����J���&d3�[D���>Q��}��ǟULAME3.100UUU��s���l@4D�*@a@�"�D��XPP��h�j ۨ�!�L#���8b�R��/��������!�u`PB7ULق�E$�'Pӊ�E,,Ckz�����!z���i�Yb�:���V��K�Q���d���gPl7 ��@ �^�4�ΖEM��O�o��Ū���z���]E�[S��%��7K:�#� � �K�M���_߿��(N��n��q� X`���.3Bb��F%*+�f\��o��J�kY�'2�L�`�A��LtX�i(���u{�_�d �����2/3*ۡ�]��]TODO: