How can I record in RAW data but still display the waveform?
Hello forum,
I'm practically new to Max and I'm trying to create a GUI for recording in multiple channels with a desired bitrate, and selecting my input method (almost like an Audacity clone). I can do all of this, but I would like to know if I could also see the waveform as Im recording, or when I finish the recording.
To record im using the sfrecord~ function, because some of the recordings could last several hours. How would you approach this problem?
Thank you in advance!
Jesus
If you're dealing with recording audio, you're going to have trouble with making recordings of great length. This will vary with the number of channels, the type of audio you record (WAV, AIFF, MP3, etc.) and the sample rate. You might want to do a little research on those topics before you start.
Thank you, some of the recordings will be short, maybe a couple of minutes, but can I still implement the visualization of raw data in waveforms?
it is possible, but probably not with factory objects.
you would just measure peaks in the incoming audio once in a while and draw them to a video/image/table or whatever using lcd or jitter objects and a jitter display.
i would limit the view size to given number of pixels and only allow to resize the view in multiples of 2, then it is easy to calculate.
eventually it is best done all as all-audio DSP. objects which come to mind are index~ used with a sah~, so that you can convert e.g. every 10,000th sample of the incoming stream to a permanent stream of the same value which lasts for 10,000 samples. this value can then be written in various ways into some graphic display. there are even jitter objects which take audio and display it,( but IMO they are more complicated than writing your own system)
if you feel that you dont need the values to be 100% correct (in time) you might also just use
[snapshot~ 10000]
[deferlow]
to get the values.
the values can be written directly into your graphics - while also beeing stored somewhere else as a list of numbers, which can easily be saved to disk from there as text file for the next time you open the patcher/samples.
Thank you Roman for your detailed answer
I will try to do this
I ended up using a JVKR's implementation of LCD from:
https://cycling74.com/forums/live-scrolling-waveform-display
If anyones interested