How to copy stereo audio data from [waveform~] to [buffer~] ?

    MaxMSPadvanced

    jamie bell's icon
    jamie bell's icon
    jamie bell
    Mar 01 2016 | 11:20 pm
    I'm trying to use [waveform~] to select an area of a track and copy the data to a different [buffer~] object but it is only copying the left channel.
    The [buffer~ TuneA 200. 2] connected to [waveform~] has a [groove~ TuneA 2] for audio playback and produces stereo sound that I can hear, and the patch is set to produce. The [buffer~] objects that I am copying to also have 2 channels assigned and so do the [groove~] objects for playing their audio.
    I have added an extra [waveform~] and linked it to the original [waveform~] then sent them both a message "name TuneA x" where 'x' is either 1 or 2 to identify which channel to display. This seems to work perfectly fine and functions performed in one [waveform~] are shared by the other. I've tried selecting an area inside the [waveform~] assigned to channel 2 and copied to a different [buffer~] but I still get a left/mono channel copy of the audio into a different [buffer~] .
    The copying of data is done using [peek] and works fairly well, except for the issue of not copying both channels :/
    Many thanks for any help/advice in advance

    • mzed's icon
      mzed's icon
      mzed
      Mar 02 2016 | 12:23 pm
      Could you post your patch? You should be putting the channel number into the right inlet of peek, and you'll need to write each channel.
      Share
    • jamie bell's icon
      jamie bell's icon
      jamie bell
      Mar 02 2016 | 1:27 pm
      Thanks MZED :D After reading your reply I added an extra [peek~] and then feed the values 1 and 2 into each of them and VOILA!! I now have stereo samples, yay!! I didn't think the problem was [peek~] related as I presumed it would read/write all the values at once and so much be a [waveform~], [buffer~] or [groove~] issue!
      Many thanks for that