CSVMIDI(1)
πΎ CSVMIDI β the csvmidi(1) page but make it a group chat
okay bestie, pull up a chair, we're reading the manual for csvmidi, a General Commands Manual entry and honestly? it's giving β¨pipeline royaltyβ¨.
πΈ NAME πΈ
csvmidi β encode a CSV file as MIDI π
like. it takes your lil spreadsheet lookin' text file and turns it into a whole actual MIDI file. iconic behaviour, no cap.
β¨ SYNOPSIS β¨
csvmidi [ -u -v -x -z ] [ infile [ outfile ] ]
that's it. that's the whole vibe. four lil flags and two optional files, and she's doing the most π
π DESCRIPTION π
so csvmidi reads a CSV (Comma-Separated Value) file β specifically one in the format that midicsv writes β and creates the equivalent standard MIDI file out of it.
that's the whole job. read the spreadsheet, spit out the bops. πΆ
π OPTIONS π
-uβ prints how-to-call information. the "bestie i forgot the syntax" button π«Ά-vβ prints verbose debugging information on standard error. it dumps the MIDI file header, plus the length of each track in the file. she's nosy and we love her for it π-xβ okay so MIDI streams have this rudimentary lil compression thing where successive events with the same status (that's the event type and channel) can just... omit the status byte. by defaultcsvmididoes take advantage of that compression. but if you pass-x, the status byte gets emitted for all events β it is never compressed, even when the MIDI standard would totally allow it. so-x= no shortcuts, full transparency, main character energy π-zβ most errors found in CSV records just cause a warning message on standard error and then the record gets ignored. but-z?-zsays "we're not doing that today" and makescsvmidiimmediately terminate processing the moment the first error shows up. dramatic? yes. effective? also yes π
π¦ EXIT STATUS π¦
- if no errors and no warnings get detected β
csvmidiexits with status0. slay. - status
1gets returned if one or more errors were detected in the CSV input file. π - status
2means a syntax error on the command line, or it couldn't open the input or output file. π
π FILES π
if no infile is specified, or infile is '-', then csvmidi reads its input from standard input. and if no outfile is given, or outfile is '-', the MIDI output gets written to standard output.
and here's the cute part: the input and output are processed in a strictly serial manner. which means csvmidi can be used in pipelines without restrictions. pipe her, chain her, she's built for it π«Άπ₯
π BUGS π
okay bestie, listen up, this part matters.
csvmidi assumes its input is in the format written by midicsv. if you hand it a CSV file with well-formed records that nonetheless makes no semantic sense as a MIDI file, the results will, in all likelihood, simply perplex any program or instrument you send it to. not crash β perplex. which is honestly worse. π
csvmidi does check for missing fields, and it does range-check all numeric values. but it does not do higher-level consistency checking β for example, it will not make sure that every note on event is paired with a subsequent note off. so if you need that level of verification, do it on the CSV file before it gets processed by csvmidi. periodt.
also: exporting a file to CSV with midicsv and then importing it back with csvmidi is not guaranteed to create an identical MIDI file. why? because MIDI files support compression modes which are not obligatory.
BUT β a MIDI file exported to CSV and then re-imported should still be equivalent to the original file. and if you export that to CSV, it should be identical to the CSV exported from the original file. so like... same energy, maybe different bytes. iykyk β¨
and please, if something's broken, report problems to bugs@fourmilab.ch. they wanna know, fr fr π¬
π§ SEE ALSO π§
(the whole squad, honestly π«Ά)
π AUTHOR π
John Walker
http://www.fourmilab.ch/
this software is in the public domain. permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restrictions. this software is provided ``as is'' without express or implied warranty.
like. go wild. no strings. that's the whole license and it ate π
and that's the page!! brought to you by the 4th Berkeley Distribution, dated 9 FEB 2004 β vintage but make it cute. go encode some CSV, bestie, you got this πβ¨π
π¦ where this page comes from
- debian bookworm: midicsv 1.1+dfsg.1-1+b1 Β· LicenseRef-public-domain
- debian trixie: midicsv 1.1+dfsg.1-1+b2 Β· LicenseRef-public-domain
- nixos 26.05: midicsv 1.1
- nixpkgs unstable: midicsv 1.1
- ubuntu jammy: midicsv 1.1+dfsg.1-1build1 Β· LicenseRef-public-domain
- ubuntu noble: midicsv 1.1+dfsg.1-1build1 Β· LicenseRef-public-domain
- ubuntu questing: midicsv 1.1+dfsg.1-2
- ubuntu resolute: midicsv 1.1+dfsg.1-3 Β· LicenseRef-public-domain
- ubuntu stonking: midicsv 1.1+dfsg.1-3 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms