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

Feb 4, 2011 at 10:12am

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

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 :)

#54790
Feb 4, 2011 at 10:18am

…er, I mean using an ezadc, ahem…

#197253
Feb 4, 2011 at 11:06am

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

#197254
Feb 4, 2011 at 11:38am

You can use the DLS synth as AU plugin (works well for me).

http://cycling74.com/forums/topic.php?id=30046

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.

#197255
Feb 4, 2011 at 12:23pm

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.

#197256
Feb 4, 2011 at 12:33pm

One thing: what’s the significance of the 144 in the midievent message?

#197257
Feb 4, 2011 at 1:29pm

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.

– Pasted Max Patch, click to expand. –
#197258
Feb 4, 2011 at 1:57pm

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’!)

– Pasted Max Patch, click to expand. –
#197259
Feb 4, 2011 at 3:08pm

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

#197260
Feb 4, 2011 at 6:46pm

Thanks very much.

#197261

You must be logged in to reply to this topic.