Forums > MaxMSP

Playing a waveform

April 14, 2010 | 3:09 am

Hi, is it possible to produce a sound from a waveform? As opposed to viewing the waveform of a sound.


April 14, 2010 | 10:03 am

send this message to [waveform]: mode draw

that’s ONE way

obviously you already know how to set waveform to your own buffer?


April 14, 2010 | 2:22 pm

Honestly, I don’t know much about Max/MSP, I have only used it a few times for some fairly simple things like adjusting the frequency of an oscillator. So no I don’t think I do know how to set waveform to a buffer.

Thanks


April 14, 2010 | 2:53 pm

Basically, I want to take a drawing of a square wave, made in AutoCAD or a similar program, (so the "waveform" would be an image), I could generate a list of the distances between each high and low peaks of the wavelength, and then "play" the waveform.


April 14, 2010 | 3:40 pm

this should get you started:

– Pasted Max Patch, click to expand. –

April 14, 2010 | 3:50 pm

oops, almost forgot, also look in Cycling74/examples/utilities/buffer-writer


April 14, 2010 | 4:05 pm

this may be a dumb question, but what do I do with that text you sent? The one you said should get me started?

Thanks and I apologize for my lack of Max/MSP understanding.


April 14, 2010 | 4:36 pm

ok
select and copy all the text including the hyphens at top and bottom, then go Max/File/New From Clipboard; i think that patch, plus the buffer-writer example should get you going. Don’t forget to post your solution for everyone else (unlock your patch, select all, go Edit/Copy Compressed and paste it into your post)
Brendan


April 14, 2010 | 5:46 pm

So I bring that text in as "New From Clipboard" and then how do I actually use it? It seems to just be a window of text, no objects or anything.

And I will definitely post the patch I come up with if I can ever get it working.


April 14, 2010 | 8:15 pm

I guess you’ve made an error, or you don’t have the latest version of Max (5); i don’t know a way round this, but here’s a screenshot of the patch above

[attachment=129951,378]

Attachments:
  1. drawWin.jpg

April 16, 2010 | 4:22 am

So I recreated this code and got it working fine. Thank you! My only question now is, can I set "myShape" to be an image?

Basically I am drawing waves, both pure and complex in a program and saving them as jpegs, or really any image file, and want to encode them into an audio signal. Would I have to convert the image file to a graph somehow?


Viewing 11 posts - 1 through 11 (of 11 total)