Recording MIDI noteouts as audio within the same patch..?


    Feb 04 2011 | 10:12 am
    Hi, I'm a relative Max/MSP newb, and am trying to do the above; i.e. record the MIDI sounds created in a patch (using the built-in Mac DLS synth) as audio (using an ezdac) within the patch in order to process the sound further...
    I know MIDI is streams of numbers, but the sounds they represent exist - I can hear 'em! I've tried using Soundflower but it seems to want to talk between different applications, not the same one. I have no MIDI hardware - just the computer...
    Thanks for any helpful direction :)

    • Feb 04 2011 | 10:18 am
      ...er, I mean using an ezadc, ahem...
    • Feb 04 2011 | 11:06 am
      hi one possible way: look at maxobjects.com for fluidsynth~ this gives you midi and audio within the patch.
      using soundflower: you have to set system audio out to soundflower: this is done in applications/utilities/audio-midi-setup. then you can reroute the audio into max/msp
      all this assuming you are on mac...
      hth hans
    • Feb 04 2011 | 11:38 am
      You can use the DLS synth as AU plugin (works well for me).
      Thus audio output will be directly available in your patch.
      Just create an object [audiounit~ DLSMusicDevice]
      MIDI input must be in special format, ie. raw midi bytes prepended with 'midievent'. For example, is note on channel 1, pitch 60 and velocity 80.
    • Feb 04 2011 | 12:23 pm
      Thanks for your responses!
      Kochhw; I'm on a Mac, and embarrassingly both Soundflower and the fluidsynth object aren't making sense to me in terms of this problem... Broc, the audiounit object is, however, so I think I see a way forward.
      Your swift and interested responses are very much appreciated sirs.
    • Feb 04 2011 | 12:33 pm
      One thing: what's the significance of the 144 in the midievent message?
    • Feb 04 2011 | 1:29 pm
      144 is the midi byte code for note on channel 1, 145 would be note on channel 2 etc.
      Here is an abstraction I'm using to generate the required format.
    • Feb 04 2011 | 1:57 pm
      Thanks - are the different channels to do with being able to have different simultaneous (as in pgmchange for the DLS synth) voices?
      I'm afraid I don't know what your CC and PC inputs are: below is the simple way I'm generating audio from MIDI thus far (I stress the word 'simple'!)
    • Feb 04 2011 | 3:08 pm
      Yes, the channels can be used to play different voices (instruments) at the same time. Hence the DLS synth is also called a "multi-timbral instrument".
      CC = Control Change PC = Program Change
    • Feb 04 2011 | 6:46 pm
      Thanks very much.