Does anyone else have an opinion on @BOUNCE mode’s behaviour (above)?

It is the way it is because it’s how all the other modes are implemented, i.e.: the fence is on the other side of the cell. In @WRAP mode, it makes sense: you travel 0.5 cells over the edge, and you’re 0.5 cells in on the other side.

Note that I can change @BOUNCE without altering the behaviour of @WRAP or @BUMP.

If everyone is fine the way it is, I’ll call my beta8 branch the first release candidate.

yes, i feel this is much more logical and easier to visualize. fences in the middle.

i haven’t thought hard about wrap and bump, however-- will think about that.

1 Like

The 1 2 3 2 1 2 version looks more consistent at a first glance but I have to admit that I don’t fully understand what it means if the fence is in the middle of the cell.

Is a cell that is halved by a fence still fully accessible? Like can you set the turtle on cell 1 in your example or will it immediately bounce to cell 2 then? The position is rounded, isn’t it? Will the turtle will be at 0.5 in both cells as in your @WRAP example? What does it practically mean to be 0.5 over the edge - which cell value does the turtle output then?

Fence Behaviour

Bounce Mode

For the sake of explanation, consider this scene:

@F 0 0 2 2
@DIR 0 // North
@BOUNCE 1

To start, the turtle is at (0.5, 0.5), i.e.: he is standing in the middle of the cell. Then, @STEP.

Scenario 1: The fence is at the edge of the cell

The turtle walks 1 cell in the direction of the north fence. Halfway, he hits the fence and turns around. After traveling the distance of 1 cell, the turtle is back where he started, facing the other direction.

Scenario 2: The fence is in the middle of the cell

The turtle starts to walk, but he immediately hits the fence and turns around. He walks 1 cell’s distance and arrives at (0.5, 1.5).

Wrap Mode

@F 0 0 2 2
@DIR 0
@WRAP 1

As before, we start at (0.5, 0.5). @STEP.

Scenario 1 (edge)

The turtle walks 1 cell in the direction of the fence. Halfway, he is teleported to (0.5, 3.0). Then he walks the remaining half a cell and ends up at (0.5, 2.5).

Scenario 2 (middle)

The turtle walks 1 cell in the direction of the fence, and is immediately teleported to (0.5, 2.5). He finishes his 1 cell walk, and he arrives at (0.5, 1.5). This violates the intent of wrap mode, where you would expect to land at (0.5, 2.5).

Bump Mode

@F 0 0 2 2
@DIR 0
@BUMP 1 // default, actually

From (0.5, 0.5), @STEP.

Scenario 1 (edge)

The turtle walks towards the fence, but halfway through his one-cell step, he hits the fence and stops. He is now at (0.5, 0). We might say that he’s kind of lost “alignment” with the middle of the cell. It will still behave as expected on subsequent steps, but it’s offset internally.

Scenario 2 (middle)

The turtle starts to walk toward the fence, but is immediately stopped by the fence. He remains at (0.5, 0.5), retaining his middle-of-the-cell alignment.

Conclusion

There is no fence alignment that satisfies the needs of all three modes. Fortunately, I can assign the fence position differently for each mode. My preferences:

  • @BOUNCE - middle
  • @WRAP - edge
  • @BUMP - middle

I hope that the preceding analysis answers any outstanding uncertainty regarding the fence behaviour.

Warning: stop reading if you value the comfort of certainty.

! Integers have an even number of values, as does the fractional content which is implemented with integer math. You are never really in the center of the cell, as there are an even number of positions to be in, and no middle.
! There are conceptual ways around this fact, such as designing a numbering system with an odd number of values, but they’re more effort than they’re worth.
! The fractional values are only used internally, so the only thing that matters is the behaviour, i.e.: the resultant non-fractional integer, so I let this little imperfection slide.
! The sin() implementation is probably less accurate than this tiny offset, so what happens at non-cardinal angles is more governed by that fact than by the minute offset that the number system introduces.

3 Likes

i am in agreement with your conclusion, thank you for the writeup

1 Like

No bug fixes to report since beta8, so it’s time for rc1!

Changes:

  • Preliminary Turtle documentation
  • Fence change for @BOUNCE mode (and @BUMP, but its behaviour doesn’t change)

teletype-2.1.0-rc1.zip (481.6 KB)

2 Likes

It occurs to me that maybe there should be a hotkey in TRACKER mode to toggle @SHOW.

Thoughts on this, as well as a keystroke @tehn? Maybe SHIFT-2 (@)?

edit: Shift-2 it is! I’m sure slipping such a change into a second release candidate isn’t too unorthodox :sushing_face:

I’m going to put some hours into running the first such candidate with this insignificant keystroke implementation and aim for final RC by, say, October 5th, leaving 7 days to soak before an October 12th release, which I think will be appropriate because it will be 1 month from the start of the “beta”.

3 Likes

I just installed 2.1.0rc-1 and started playing with the turtle. Here are some experiences I made:

  1. I can not get the turtle to move diagonally through the grid. With @DIR 45 it moves sidewards or upwards or does nothing.

So while the tendency is a diagonal movement, the way through the (4 x 8) grid shifts over time through the grid as the rhythm between skipped steps and walked steps does (skipping occurs more or less often in phases over time).

I assume this comes from the rounding of floating point position and direction but I wish it would not be like that.

Sounds like this:

M 100, @DIR 45, @F 0 0 7 7, @WRAP (ascending values from 1 to 32 in 8 rows from left to right)

M:
@STEP
CV 1 N @

https://soundcloud.com/leverkusen/turtle-walk

  1. The behaviour of filling in values in pattern view has changed, has it? I need to press ENTER now to set a value, then the cursor goes down a row. It makes it a bit tedious to fill in rows from left to right now. Before the change you had to delete the value prior to change it or you just would have increased the number of digits, which was a bit cumbersome too but at least you could easily move around with the arrow keys. Don’t know what I like more, maybe a question of habituation. Also columns might be more important than rows. It’s just that I only recently got accustomed to the old way.

  2. Also a question of habituation - typing turtle scripts on the forum is a pain cause the forum immediately suggests members names when you start writing @…

Turtle is a lot of fun after all and I also already used EVERY, which seems to be quite handy too.

:slightly_smiling_face:

4 Likes

@DIR 45 will behave this way in @BUMP mode.

For predictable movement, use @MOVE x y where x and y are relative offsets.

Yes. The change was to permit more musical access to the pattern data. Previously, it was as rhythmically accurate as you could delete and type an entire value. Now it’s as accurate as you can press the enter key.

It makes the tracker more useful for live performance, and that outweighed the concern of legacy habits. I hope you get used to it, and if you have any ideas that would improve the access model, I’m all ears!

I feel your pain, trust me.

Glad you’re enjoying the build!


As I have also been using this build, here my only qualm:

  • @SPEED is too long, especially when you’re adjusting it relatively, such as @SPEED + @SPEED / @SPEED 2, which is too long to fit in text.
    • I’d love to see @V as an alias for it, as in “velocity”
    • I would also accept @S or @SP to keep it memorable

It acts this way in all modes. For more predictable movements while using @DIR for easy direction changes I figured out that@SPEED 141 is a good idea for diagonal movements…:point_up::man_student:

Yes, I can see the possible benefit of it. How about letting the cursor stay in the actual cell after the new value is confirmed with ENTER? Might be useful for performance to be able to alter one cell again and again without manually having to go back to it and you could still use the arrow keys to navigate blind.

Combining input acknowledgment with automatically moving to a new row is something that constantly drives me crazy in excel spread sheets too. I think it breaks the flow more when you have to go up again after every input to move sidewards then it would do to just move one cell down after ENTER when you want to stay in the column. It’s an old line based automatic function that does not make sense in a multidimensional grid.

EDIT: Oh, and I love EVERY! :star_struck:

2 Likes
@DIR 45
@WRAP 1
@STEP

@X => 1 and @y => 63 which is what I would expect from a 45 degree step from 0,0. :man_shrugging:

For 45 degree movements, yes.

I’m for this change. I wonder what @tehn and others think.

i’m for this change-- is there a key combo for the old behavior that would work? i think shift-enter is taken?

Yes, shift enter is insert, shifting lower values down.

I wonder if it needs a dedicated keystroke seeing as you can <Enter>, <Down Arrow>.

edit: Alt-enter and Ctrl-enter are available

agreed, let’s just skip the dedicated keystroke. it seemed good for rapid bulk entry of a sequence, but i doubt the down arrow introduces much friction. we can always revisit this

3 Likes

As promised, here is 2.1.0-rc2:

teletype-2.1.0-rc2.zip (484.8 KB)

Changes:

  • Added EVERY, SKIP, OTHER, and SYNC
  • SHIFT-2 in tracker mode will now toggle @SHOW
  • Tracker data entry
    • Enter no longer moves selected cell down
    • [ and ] now behave the same in entry and nav mode, wrapping instead of bumping
    • [ and ] no longer show values exceeding INT16_MAX or INT16_MIN (bugfix)
5 Likes

Two questions / thoughts regarding the new turtle OP:

@SPEED - get/set speed in 1/100 of a cell per second, default 100

It is 1/100 of a cell per step, isn’t it? I think I prefer it over being time correlated.


To make the the movement more predictable with @DIR @SPEED @STEP I use a line

@X @X; @Y @Y

to round the internal fractional position to its actual grid position on every step. How about an operator that does this - like @FIX (or @SIT since it is a turtle)?

It also practically rounds the 360 degrees to the 8 possible directions in a two dimensional grid and you don’t have to calculate direction changes to 45 degree steps anymore which saves even more resources and makes the scripts less complex.

Playing with higher uneven speed values is much fun when it is paired with predictability if you want that.

Life is a bit better with turtles!

:star_struck:

1 Like

Yeah, you’re right. 1/100 of a cell per step.

I guess you could look at it that way, but I still wonder if you you would prefer @MOVE 1 1 for a predictable 135 degree step. I think that would also eliminate complexity.

I’m glad that you’re finding value in all these new features!

I guess you could look at it that way, but I still wonder if you you would prefer @MOVE 1 1 for a predictable 135 degree step. I think that would also eliminate complexity.

Hm, but how would I do something like SCRIPT 1 moving the turtle forwards and SCRIPT 2 changing the direction then? It would need two variables changing between -1, 0, 1 in a meaningful manor. Plus scaling them when you’d like speed changes.

True, but it would be completely predictable. I’m not sure that @DIR 45; @STEP ever will be due to the cheapo sin() implementation plus rounding errors.

edit: Plus, you have a logical selection for variables in X and Y.

True, but it would be completely predictable. I’m not sure that @DIR 45; @STEP ever will be due to the cheapo sin() implementation plus rounding errors.

Okay, I stay with @X @X; @Y @Y then - don’t know much about mathematic completenesses but it seems at least pretty predictable. Maybe I am just feeling uncomfortable with things not being where they seem to be…

edit: Plus, you have a logical selection for variables in X and Y.

I don’t understand this?