home *** CD-ROM | disk | FTP | other *** search
/ Computer Panoráma / computer_panorama_1997-12-hibas.iso / SHARE / SOUND / MIDILANG.ZIP / TRANSPOS.XPL < prev    next >
Encoding:
Text File  |  1997-09-27  |  774 b   |  51 lines

  1. /*
  2.  
  3.  
  4.         Transposition of all notes from a set of midi channel
  5.         on any .mid file or in live during your play
  6.  
  7. */
  8.  
  9.  
  10. init ()
  11. {
  12.     var nbtrans; /* nb transposition */
  13.     var midi[10];
  14.     var trans[10];
  15.  
  16.     /*
  17.      define below the list of midi channel to transpose and the transposition
  18.     to do ( + or - nb_notes )
  19.             */
  20.  
  21.     nbtrans = 3;
  22.  
  23.     midi[0]=2; /* channel 2 */
  24.     trans [0] = -5;
  25.  
  26.     midi[1]=4; /* Channel 4 */
  27.     trans [1] = +4;
  28.  
  29.     midi[2]=3; /* channel 3 */
  30.     trans [2] = -4;
  31.  
  32.     savein (0);
  33.     /* don't save the incoming notes */
  34. }
  35.  
  36.  
  37. main ()
  38. {
  39.     var i;
  40.     for (i=0;i<nbtrans;i++)
  41.     {
  42.         if ( chan == midi[i])
  43.             note += trans[i];
  44.         outmidi ();
  45.     }
  46.     descript ("Automatic Midi Transposition");
  47.     descript ("Live or as a Post-Processor");
  48.  
  49. }
  50.  
  51.