SMENC(1)
π SMENC(1) β the smenc manual page π
Okay bestie, welcome to the smenc manual page. Weβre gonna encode a wav file into a SpectMorph model and look cute doing it. π
β¨ NAME β¨
smenc β program to encode a wav file into a SpectMorph model. Thatβs the whole assignment. Periodt. π
π¦ SYNOPSIS π¦
smenc [OPTIONS] WAV-File [SM-File]
πΈ DESCRIPTION πΈ
smenc is the command line tool for creating SpectMorph models from audio files. Usually the input file should contain a single note of some instrument, like a single C4 note. Lowkey, lower notes require different analysis parameters than higher notes, so itβs usually a good idea to use the -m option to let the encoding algorithm know which note is being encoded.
Thereβs also a quality / time tradeoff, which means you can use -O0, -O1, or -O2 to specify how accurate the analysis should be. Higher numbers mean better quality, but longer analysis time. Itβs giving βbeauty takes time,β honestly. β¨
For multi-channel inputs, each channel is encoded separately. If you do not specify the output filename, the encoder will, for instance, create piano-ch0.sm and piano-ch1.sm from the stereo file piano.wav. If you do specify an output filename, you need to include a %c into the name, like piano-ch%c.sm, which will be substituted with the channel number. Iconic behavior, fr fr. π«Ά
π OPTIONS π
smenc follows the usual GNU command line syntax, with long options starting with two dashes ('-').
-h,--helpβ shows a brief help message. Your βwhat is thisβ button. π-v,--versionβ prints outsmencversion. Slay, now you know what youβre running.-f <frequency>β specify fundamental frequency in Hz. This information is optional, but should be supplied when known, to increase the accuracy of the model. It is equivalent to specifying the midi note; only one of-mand-fshould be used. Donβt use both, bestie. π«-m <midi-note>β specify the midi note of the input; this will be used to set the fundamental frequency in Hz. Adding this information is not required, no cap, but it increases the accuracy of the analysis algorithm. Only one of-mand-fshould be used. Again: pick one. π-O <level>β for all frames of the input file, oncesmenchas found out which sine waves can be used to describe the frame, it needs to estimate the magnitude and phase of each sine wave for this frame. The optimization level chooses the algorithm used for finding the magnitude and phase; the higher the level, the more accurate the result will be. However, it defaults to-O0, since this is the fastest algorithm: estimating the magnitude/phase from the FFT result. A good choice is-O1, which is somewhat slower, but also somewhat better. So-O0= speed,-O1= glow-up,-O2= full main character energy. π₯ iykyk.-sβ right now,smencdefaults to including lots of information in the output replaying the file. Therefore the files created bysmencare very large by default. To limit the file size, using the-soption instructssmencto create a "stripped" model, that contains only the information needed to play it. These stripped models are usually much smaller than unstripped models. Big file energy? Not anymore. π--no-attackβ by default,smenctries to find an attack envelope at the beginning of the input, which describes at which time point the attack occurs and how fast the attack is. This option disables that step (which uses quite a bit of CPU time). Saving CPU? We love to see it. β--no-sinesβ skip analysis of the sine part of the signal (partial tracking). No sine analysis today, bestie.--loop-startβ set start loop point (in samples) β loop type is set totimeloop. π--loop-endβ set end loop point (in samples) β loop type is set totimeloop. π
π SEE ALSO π
smplay.1 <https://testbit.eu/wiki/Smplay.1>
π Catch you later β this SMENC(1) page is Revision 576, dated 2011-07-19. Mwah! π
π¦ where this page comes from
- arch rolling: spectmorph-tools 0.6.1-2 Β· LGPL-2.1-or-later
- nixos 26.05: spectmorph 0.6.1
- nixpkgs unstable: spectmorph 0.6.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms