Recording pulse to table question


#1

Hello :slight_smile:

I was just playing around with recording some sequences(pulse signals) to a table, to play them back later. For now I have been using a table/alloc 8b sdram. It works fine, but I was just wondering if there are other ways of recording pulses to table. Since it is basically only zero and one(on/off) being written, there is really no need for all 8 bits so I would like to save that for other purposes.

Or another thought; maybe I could record more than one sequence at once in the 8 bits? Like maybe 4 sequences?

Thanks in advance, Jaffa


#2

You could hack the 32bit nature of variables. You can use shift registers for that, but you're limited to 32 bit long sequences.
I and sirsicksick have made a couple of objects, maybe you can try them

Imagine a long box with a certain number of sections (in the case of axoloti it's 32, but for this example i'll do 8) and two open ends.

something like this:

Also, you can read the leftmost bit as an output. In this case the register is completely empty, so you'll read 0 as output.

Now, say you want to input some data in the register: you can shift all bits to the left (but in this case nothing happens, since the box is already empty) and fill the rightmost bit with the input:

So, the register will become like this:

Now, if you shift again to the left (but with a 0-valued input):

You can see how it works, very basically.

Let's fast forward to a more interesting situation, with the box already "filled".

If you shift left, the leftmost bit is discarded, and the input is inserted on the right.

This configuration is named SISO (serial in, serial out), but there's also SIPO (serial in, parallel out) that allows you to "load" the register one bit at a time and read all the bits together.
PISO (parallel in serial out) allows you to input data in one shot, and output bits one at a time,
PIPO (parallel in parallel out) not sure what it's used for, but it exists too.

My object sptnk/logic/shift register can do all of these configurations.


#3

Thank you for the technical details. I has a thought that shifting was one way to do it. BUt it is still not 100% clear to me how to do this. But I guess i need to look through those objects you mention. And I now know what to google :slight_smile:

I think I need to be confirmed in a few things here. 32 bit means sequences of length of 2048? 16 bit can store 1024 in length, right? I would like to be able to record more "layers" of sequences, so I can basically record more than one sequence to a table at at time.

The approach I have used now Is basically just a pulse sequencer controlled by a counter and then fed into the table...., Create you pattern on the sequencer that you like, push record and it stores the sequence to a table. But this is a bit clumsy... For some reason if I want to have a 16 step sequence I would need to record a 32 samples long sequence... Just recording 16 doesnt work here... I guess if I just record 16 pulses to a 16 samples long table, Axoloti wil only understand the first note send:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Like the above, 16 notes but no pauses inbetween. THis means that Axoloti ONLY plays back the first on the 16 pulses and is thereafter silent.... BUT if I on the other hand record 32 steps (32 samples) i get both on and off, like this:

1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

This works, BUT since it is twice the length I would also have to play it back at dobbelt speed... Small issue I guess.

This is my naive approach. In this set up, a counter and the table sets the length. You approach sounds more advanced and also more effective.. I guees I need to do some more reading.

I checked your siso object. Wil try it and see what I can come up with. Oh, btw, which other objects did you mean tht you and sss have made that can save sequences to table?

Thanks :slight_smile:


#4

Here is a picture f the recording system and the playback system. Both works fine. You write the sequencer on the top one and play it back from the table below. I tried to make the disp/ibar blink when the table sends out a pulse. It works but doesnt really give a good result, it is very hard to see what is going on. But that is not really an issue.

@SputnkiI tried looking at the help patch for the shift register object.. I dunt really understand it much yet. Do you think it could be combined with recording system I made?