Be the first to rate this file! 0 Downloads (last 30 days) File Size: 473 KB File ID: #34945

Cacofonix

by Benoit Charles

 

06 Feb 2012

Cacofonix is a library to create midi files.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
midi, music
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.

Contact us