Cacofonix is a library to create midi files. A complete documentation is provided in the archive.
To preview a little more, this is an (advanced, don't panic) example:
NoteInit
COUPLET = Note( 'Marker', 'COUPLET' );
RYTHMIC = [ ...
R:N8 G:N8 A:N8 C++C:N8 bar ...
~C++C:N2 R:N8 G:N8 A:N8 D++D:N8 bar ...
~D++D:N2 R:N8 D++D:N8 E++E:N8 F++F:N8 bar ...
~F++F:[N2 N8] F:N8 G:N8 C++C:N8 bar ...
~C++C:N2 ];
RIFF = [ V-0:N8 bar ~V-0:[N2 N4'] ];
CHOEUR = [ C*CM*RIFF D*CM*RIFF F*CM*RIFF C*CM*RIFF ];
CHOEUR2 = [ (-G+C+E)*RIFF (-Fs+-A+C+D)*RIFF (-A+C)*RIFF (-E+-G+C)*RIFF ];
CHOEUR3 = [ ~COUPLET R:N4' C*RIFF D*RIFF F*RIFF C*CM:N8 bar ...
~C:N8 G:N8 A:N8 +C:N4 R:N4' bar ];
LYRIC = [ ~COUPLET ...
R:N8 C:N8 E:N8 G:N8 bar ...
A:N8 A:N8 G:N4 E:N4 D:N8 C:N8 bar ...
C:N8 D:N4 -A:N4 -G:N8 -A:N8 C:N8 bar ...
~C:N4 G:N4 E:N4 D:N8 C:N8 bar ...
R:N bar ];
PIANO = [ Note('--') RYTHMIC COUPLET RYTHMIC ~C++C:N2 bar ] / ...
[ R:N4' CHOEUR2*2 ~-E+-G+C:N8 bar ];
BASS = [ Note('-') ~COUPLET [ RYTHMIC ~C++C:N2 ] / ...
[R:N4' CHOEUR R:N8 ] bar ];
PERCU = [ R:N2 bar 8*[ [ V R V V V R V R ].*N16 R:N2 bar ] ];
TAMBO = [ R:N2 bar 8*[ R V bar ].*N2 ];
cacofonix( 'F@#getYou_CeeLoGreen', 'Tempo', 130, ...
'Honky-tonk Piano', PIANO, ...
'Solo Synth Vox', LYRIC, ...
'Voice Oohs', CHOEUR3, ...
'Acoustic Bass', BASS, ...
'Acoustic Grand Piano', BASS, ...
'Low Bongo', PERCU, ...
'Tambourine', TAMBO );
If you can modify the sound font of your player, I used ChoriumRevA: you can get it on the web for free. But don't worry if you can't, or if you don't know what is a sound font.
引用格式
Benoit Charles (2024). Cacofonix (https://www.mathworks.com/matlabcentral/fileexchange/34945-cacofonix), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- Signal Processing > Audio Toolbox > Audio I/O and Waveform Generation >
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Audio and Video Data > Piano sounds >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!cacofonix/
cacofonix/DON'T OPEN/YOU DON'T SEE ME/GO AWAY!/
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 |