How export generated sound into audio file
Hi guys, i’ve a problem. I created a keyboard application that records what i play, but i can listen the melody only through the max application. I just want to export the sound into an audio file, for example mp3 file. How can i do?
Edit: oh well, i found the way to export the audio through "write" element. The application saves it as a midi file, there’s someway to export as mp3?
If you’re using MSP, you’d use sfrecord~. But it sounds like your patch is just generating MIDI that is being rendered by your computer (ie, by the OS and audio hardware, and not by Max/MSP). You could re-route the sound card output with Soundflower or similar and then record to sfrecord~.
Last time I looked sfrecord~ would only save non-compressed audio (AIFF, WAV, etc.) and not MPEG3. There are a number of standalone apps that will convert non-compressed to compressed audio for you, though. For instance, iTunes.
Thany u very much for answering. Aiff or wave format are good for me, but i really don’t understand how to record the midi sound generated from my keyboard application and save it on pc in aiff/wave through "sfrecord". I’m reading a tutorial and it says:
"sfrecord~ records to disk whatever signal data it receives in its inlets. The signal data can come directly from an adc~ or ezadc~ object, or from any other MSP object."
Well i made as shown in the example.. how i have to do? Here is my example patch.
your patch demonstrates an error in understanding: MIDI is not sound.
Your Max patch is generating MIDI numbers (notes, velocity etc) which are sent to a MIDI synth – your computer has one built into the soundcard.
[sfrecord~] is for recording AUDIO only, and as Peter says, you need some way to route the audio from this MIDI synth back into MaxMSP.
There is no way in Max alone to record audio output of a non-native GM synth. I’ve never used the [vst~] object but perhaps you can plug a synth in here and get audio output?
This patch is a quick fix, and sounds sh*te because it’s recording the laptop mic picking up the speakers’ output.
----------begin_max5_patcher---------- 789.3ocyXsrbaBCEcsyL8efg0tdzSDzc86HSlNxfriZ.gGPt40z9sWjjwAm. ARLA7Fj3Zj04btO3Jd9aWsvec9ChReue3cs2hEOWYYg0lwxhZCK7y3ODmxKs OnelPKJ9m+xC+lLwZMe8u+NDdzpZeV9dcpPaWCr1ryl9wcB2d5uIMmq88to9 A1w0w2JUa+UgHV6dFVPvJvROXDxLfA1afjUfWVU0tIUG2Lqw+9sqLiUCKGLy 1xkp1IFnChg5jXkxsJdp+ROeopGBFhbDLfYIn6FLsSBh9zDT7DOItUFhOCBd XVObjZoE.ZFHz5qitOLSTVx2JNRGs3Asik6DJu64+QzpClzWj6lbktT9jk8P SjXW5x6qCQHhk5XrYHHxJJgM0AyFo3Y1+N+eVHMZ73FEny2tMscY.+gSf6O5 Nj1fwHP80Q2yqD2Wwg253K2TAl7hj1yrQiliePoATqJPBcte3aEig59OCcZe 1ZQQqhQXeUAFrXXBKpJMrlq199JB0UPGEXGnfYQQ5JxIlmJ7fULk4E.LCspZ rIp1A1kIghftWAh97ZUvnqUpbsnhOd71jnnNTHPeJTap.yReLM5bSgveAoPy QFDj5ZL5BLCJiemvDYXReB.f1TL1noXtdIWNnlJwDaEXLB4ZKAeYEFEL8gQD rMgB4xqlovnNEDZ+BRQF2RExWmFgntZtgAWhZDY5CZpEj47s22UlJS5nglO7 oZNv7W0UagnTnzbsLW0rFBxdfMHyU7vcLUVTS1e6chGiySyKbq.rBRnfnvkU y.LBEZlfYADV0LXyE1lV6N6TDsycqINOoAjSO3vQxuYSovkxDVaqnxka0BD4 UND213mJUu4CFXAq4GdkapLeeQbsxVeNZuF.NQTpkpi385W5Iu4ScqLIQnNo egLYxt7JmzAj3cS2QOiM3fyB3vCBaf4Q3HWxdU7kL39ZvFBBVQMeeEaMhv.z w6FMTC6C0AyhfNnHQ5kqulLKPKXPggr4Q1BGL3vSO3XCAbrSyWlHrwFRVZzr AMvPf1zGtENTGJZxgFcnP67TMigpg+ytB16v -----------end_max5_patcher-----------
Thank u. So MIDI is a set of informations sent to PC MIDI synth, and i need to turn back the audio to max? I found this
it might be a solution? Anyway in this case (where i download this application) it’s only me that can export the generated sound as a aiff/wave file right? No one could do the same using my patch on your own PC.
If you’re referring to LoopBe, this app passes MIDI to/from another DAW or audio program. Audio re-routing needs something else, like Soundflower – which I think is Mac only. I think. Not aware of any PC version, but you could always just buy a cheap external soundcard and connect out to in (carefully)…..
I’ve heard of "Jack" for Windows, which routes audio. Should be OK. Also the vst~ is an option, though each will have its own sounds. If you want the General MIDI sounds that you’re getting right now, the easiest option is to have another computer record it :) I would use Audacity, which can convert to mp3 as well, with the encoder installed.
Thank u all for the informations. Anyway i think i’ll follow the vst way, ‘cos i wanna my patch be universal. I’m checking it, here is the patch. I’m sure i’m wrong ‘cos i don’t know well how to link kslider to vst, and i’m not sure if "s_ tosvts_" is necessary too. I know i’m a noob. Any help will be much appreciated.
----------begin_max5_patcher---------- 871.3oc0XtsaZCCGF+ZpzdGrxtkg7oDmrc0dA1KP0TUfXndMwlkX5ZW01y97 ABk0FBtZPB6BjCN9vm+4u+9Pd5cWMIZt5AdSD3ifqASl7jImIt7r4LoMiIQU 4OrnLuwUvnJdSS9JdzzsuTyeP6egnP.32ykZ.hRAzT.bWgVmqWbqPt5lZ9Bs u+v3rYvofXLwlfPwtjzYPvWaqkbSkPVx0tNF2l6RkTKyq3tN8y0h7xn8pfZi tsFn1rEEtxpl+sOfh2UXeI0Otl6ETTzy8rsOZD+z8FDdFzk8ud2U1TSxzyAs v39vEi4oUhCSX7vPKzvRKI+Glt80vpAbCPqtuQeS.Hh4LTINBggGjPn2Lgfc Qnm83meOy5xMq5G.tAMEQsIDxf3QHWFVDi4328xlXOax7QNP3QrGuc3v5.N3 CCmFwJoss1+I6uRQi1lJj51r5gis42jeeaC+9uXqimGllSkWrQJ99FtQVSMd XPzmLs2o2bpVyk8NAj4V5BScKzSXCyBXzg0cpUqVUx62Gx1CCXXnqREvXsmH QqY5eXR+fqKuzLvT0E8G4g8C0LWRB5jutbmv33QdmiEm1TMmW2GLhI9Y7DWR L7jCCbWvHsemgYMg44xUC5N5KxK4.jowYfDnMoOpQR2ZgP9yJdr81SNMdH1k wVaRklaD.HuWDwbrgDmETTF4jb5mrnwHDxeUABbHCgt7hfpxuiacF1vmDXuW 0hPcGEjr8VCPxI2bzEx5I5Yo4TINn4eXTVIlRbQJXe.y.YiRFOazQAB1eBYb Zx4FHKU0U4tdk1Aih+OfQC512zQCH20TJJNBQf9SxC863j3LOrr8Qx5ZdCWp y0Bk7kmosiC7e.fnVtrg6MMos4UaF2tQItKiD5nbyer3tz49KT3+fB3T5AGg 2dG+wEpRUsuFvYHZLLK0bcqYPFMFYefvRnLySHaEewLhukLW8S9puFmC41W7 h4oF0l5EsCm1urEXOMUvazB4Nne8yeuh8K0shhBt7u1euRTrVYHyVkz20FBW bnKXwED3XihzRCUZ3AWZrPjV1nPMqzPgHMzvGHvBcFcDzVPtM2HfL3hKIXsM BqtEh1nihzngHs3QiZGMJMYbjFIH2FdbDG8BVbAAN7kaT5aVZXTxr3olyj5t K.KAs6emFQiGFfZyvj7Gotlm.C -----------end_max5_patcher-----------
no Max here so I can’t see the patch, but just be sure you’re sending "midievent" commands to the vst~ object. so
midievent 144 60 100 = noteon channel 1 middle C at velocity 100
midievent 144 60 0 = noteoff of the same (velocity 0 = noteoff)
hopefully I remembered that right ;)
Thanks i inserted them, but now i need to know how to play vst with kslider. Please help!
Ok guys i made it, but now just a curiosity. If i save an application there’s the possibility to "save" the vst instrument i loaded? I mean.. i would that vst could be always loaded in the patch everytime i open it, without load it everytime i use the saved application through the "plug" message.