[PD] Cycle~ difference with Max5. Was: Update cyclone maintenance

Alexandre Torres Porres porres at gmail.com
Mon Jun 8 23:05:05 CEST 2015


> There are three different situations:
> - internal cosine table, no offset possible,
> - external buffer without offset,
> - external buffer with offset.
> In all situations the phase can be controlled with the right inlet.
>

Perfect

So I try to make it work as I understand it
> should. If you have Max, you might try to see what happens in these two
> situations:

- read from a buffer smaller than 512 bytes,
> - read from a 512 byte buffer but with an offset.
> Max probably fills the remainder with zeros, or wraps around. The
> documentation
> (https://docs.cycling74.com/max5/refpages/msp-ref/cycle~.html or
> https://docs.cycling74.com/max7/maxobject/cycle~) doesn't say.
>

I have Max 6 and Max 7. By the way, it was in Max 6 that they changed the
behaviour to allow different buffer sizes and added two messages the cycle~
object can receive, one to change buffer size and the other to change the
buffer_offset.

And now for the hilarious part... the offset argument doesn't seem to work
either both in Max 6 and Max 7!!!! LOL... I'm just confirming the bug in
the MAX/MSP facebook group...

But I can only assume it should work in the same way as the buffer_offset
changes the behaviour, and I could test it with both Max 6 and Max 7!

So, nothing happens if cycle~ is running with the internal cosine
wavetable. This is indeed only for other wavetables. Attached I have an
image of a buffer with 512 samples that has the waveform of a cosine as
well, and I tested the offset by 256 points (half the table size). What
happens then is that it'll start reading the table by its mid size and when
it reaches the end of the table it'll get only zeros.

This doesn't seen much useful to me, seems more interesting if you have a
wavetable of, say, 2048, and then you're using 1024 samples to play with
cycle~ (you can change the size of how much you'll read from the table in
the newer versions, so you can set 1024 points from a 2048 point table) and
then you can scroll through the table with the offset. This way you won't
get zeros.

So this makes me wonder if it was possible in Max 5 to have a 1024 point
table and the scroll through it with the offset argument.

I have a friend who has Max 5, maybe he can help.

Cheers


2015-06-08 15:27 GMT-03:00 Fred Jan Kraan <fjkraan at xs4all.nl>:

> Hi Alexandre,
>
> Since sending the patches, I looked in the code and found a problem that
> need fixing too (the issue affects funbuff~, peek~ and poke~ too). The
> offset argument indeed only works with the external buffer.
>
> It seems to be working, apart from the offset. This needs some special
> handling if you try to read past the external buffer size. This is
> possible with small buffers or large offsets.
> But back to the patches:




> About the sample-offset, I have some problem understanding how it works,
> and have to change it anyhow to fix the issue (garray_getarraywords
> related on 64-bit systems).




> Greetings,
>
> Fred Jan
>
> > hi there, not sure what you meant, but your patches demonstrate how the
> > offset argument is not working. It's clear to me they're not affecting
> > the object at all in test 1, cause they should cancel out and they
> > don't. And according to the help file of max, the offset argument only
> > works if you give it a buffer name (so I understand it doesn't work for
> > the internal cosine function). And it seems it's supposed to be an int
> > value, meaning the sample/index offset in the table, but it doesn't seem
> > to work as well with given table names.
> >
> > Are you with me?
> >
> > cheers
> >
> > 2015-06-08 5:10 GMT-03:00 Fred Jan Kraan <fjkraan at xs4all.nl
> > <mailto:fjkraan at xs4all.nl>>:
> >
> >     Hi Alexandre,
> >
> >     >> The offset can be set as argument and it works
> >     >
> >     > I can't seem to make it work, how do you do it? can you send me a
> patch?
> >
> >     Here two patches. cycle~-test1.pd demonstrates the phase control
> using
> >     the internal buffer. I do not quite understand if and how the offset
> >     relates to the phase, but mixing two signals with a variable phase
> >     displays addition and elimination. cycle~-test2.pd should demonstrate
> >     the same with an external buffer~, but not having that I used an
> array.
> >     This doesn't do what I expect. I will do some more investigation on
> what
> >     it does.
> >     >
> >     > It seems [cycle~] will only work with tables that are 512 in size.
> It
> >     > can be of any size in max now, but  the help of Max 7 says: "This
> >     > wavetable may be of any size, _/*but historically was limited to
> 512
> >     > samples*/_." So maybe when [cyclone/cycle~] was made it was
> limited to
> >     > 512... anyway, this size limitation was something I also raised
> here.
> >
> >     To keep maintenance to cyclone reasonable, I try to limit it to the
> >     functionality of Max 5. The documentation for Max 5 is conveniently
> >     online and I have a  installation available for comparison. So Max 7
> >     functionality is out of scope for me.
> >     >
> >     > More details, in max you can set [cycle~] with other messages to
> control
> >     > the buffer size and offset, check attached image.
> >
> >     The buffer_sizeinsamps and buffer_offset attributes appear to be
> newer
> >     than Max 5. The sample-offset argument should work however.
> >     >
> >     > cheers
> >     >
> >     Greetings,
> >
> >     Fred Jan
> >     >
> >     >
> >     >
> >     > 2015-06-07 17:08 GMT-03:00 Fred Jan Kraan <fjkraan at xs4all.nl
> <mailto:fjkraan at xs4all.nl>
> >     > <mailto:fjkraan at xs4all.nl <mailto:fjkraan at xs4all.nl>>>:
> >     >
> >     >     Hi Alexandre,
> >     >
> >     >     I checked the cycle~ behaviour against the Max5 doc, and it
> appears to
> >     >     work as described. Only clicking to view the current buffer
> contents is
> >     >     not implemented (yet). The offset can be set as argument and
> it works.
> >     >     The second inlet controls the phase, which amounts to more or
> less
> >     >     the same.
> >     >
> >     >     Can you indicate what the differences are?
> >     >
> >     >     Greetings,
> >     >
> >     >     Fred Jan
> >     >
> >     >     On 2015-05-25 04:05 AM, Alexandre Torres Porres wrote:
> >     >     > hi fred, how's it going? I was checking [cycle~] and it
> seems it's not
> >     >     > behaving much closely like in max, have you checked that?
> I'm saying
> >     >     > more about its behaviour as a wavetable, where it can
> offsett the
> >     >     table
> >     >     > and everything.
> >     >     >
> >     >     > I can't find that list of bugs you were working on, where is
> it?
> >     >     How is
> >     >     > it anyway?
> >     >     >
> >     >     > thanks
> >     >     > cheers
> >     >     >
> >     >     > 2015-01-23 14:25 GMT-02:00 Fred Jan Kraan <fjkraan at xs4all.nl
> <mailto:fjkraan at xs4all.nl>
> >     >     <mailto:fjkraan at xs4all.nl <mailto:fjkraan at xs4all.nl>>
> >     >     > <mailto:fjkraan at xs4all.nl <mailto:fjkraan at xs4all.nl>
> >     <mailto:fjkraan at xs4all.nl <mailto:fjkraan at xs4all.nl>>>>:
> >     >     >
> >     >     >     Hi All,
> >     >     >
> >     >     >     At
> >     >
> http://fjkraan.home.xs4all.nl/digaud/puredata/cyclone/index.html
> >     >     >     a new set of revised help-patches for the cyclone
> library are
> >     >     >     available. Most previous remarks are applied.
> >     >     >
> >     >     >     There are now previews of the Windows binaries and
> MacOSX. The
> >     >     >     latter is build on MacOSX 10.5 with XCode 3.14, so
> should have
> >     >     >     executables for PPC, i386 and i386_64. I confirmed the
> last
> >     >     two are
> >     >     >     working (10.5 and 10.8).
> >     >     >
> >     >     >     It remains in progress, in the task list are the fixed
> and
> >     >     remaining
> >     >     >     issues.
> >     >     >
> >     >     >     Fred Jan
> >     >     >
> >     >     >     _______________________________________________
> >     >     >     Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at>
> >     <mailto:Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at>>
> >     >     <mailto:Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at>
> >     <mailto:Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at>>> mailing
> >     list
> >     >     >     UNSUBSCRIBE and account-management ->
> >     >     >     http://lists.puredata.info/listinfo/pd-list
> >     >     >
> >     >     >
> >     >
> >     >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/f693e5e9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-06-08 at 17.58.09.png
Type: image/png
Size: 49133 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/f693e5e9/attachment-0001.png>


More information about the Pd-list mailing list