I would not be sad. A little morose perhaps. :wink:

In my opinion it is always good if modules remember their state on startup.
Always.
:slight_smile:

1 Like

But it doesn’t though. All it remembers is if you’re in live or pattern mode. Not if you’re editing a script, not what line you’re editing, not which bit of the pattern you’re editing. Any unsaved scripts are also lost, along with variables, mutes, slew times, pulse times, etc, etc.

What we do do, is load the last saved preset. That’s the important bit surely?

Anyway. I removed it just to make it easier to make a change to USB saving and loading. I can re-add it very easily, but only as the simple live / pattern choice is was before.

New beta should be out today or tomorrow.

1 Like

I’ve added some robustness to the TR.PULSE code, particularly with respect to checking that the timers are always less than the TR.TIME. That code with be in the next beta, hopefully it will fix the problem you had. I can’t do too much more without a simplified example, so if it reoccurs, I would appreciate any time you’d be able to give to that.

this was a feature i requested a while back - i perform with teletype connected to a numeric keypad and like to have my scenes load in pattern view so i can keep an eye on things. i would trade the autoload for a way to toggle between live and pattern views on the numpad :slight_smile:

also, being able to load scenes with the numpad would be awesome. i know you can do this with the TT hardware - i just love the numpad ergonomics.

Do you want to post a picture of your number pad so I can see what keys are available.

Anyone else using one, or is it just you?

here it is:

perhaps forward slash ( / ) as pattern view toggle? if you’re considering scene loading as well, asterisk could bring up the load menu, with plus and minus to navigate and enter to execute.

not sure - but i suspect i’m alone.

1 Like

I haven’t done this, but will absolutely try it now. For performance I rarely need the full keyboard, but would love something small like a numpad to enter data into the tracker view. Thanks for the idea!

Sounds good to me.

The / will be mapped as TAB, so it will rotate through the modes. I’ll also map the + and - to behave like [ and ] in live and script edit mode (that way you could review the content of scripts even if you can’t edit them).

Are you running the beta yet? If not ping me when you are. I won’t implement the extra bindings until you can test them (as I can’t).

Numpad numbers run scripts, so can’t be used for data entry. Sorry!

ah to clarify the numpad will not enter numeric values in the tracker/pattern view. it’s merely a manual script trigger pad. so key 1 will trigger script 1 and so on. i like it because i can keep all the TT inputs patched to sources in the modular while still having manual access to scripts. so one song might be totally driven by meadowphysics while another has a bunch of hand activated events.

2 Likes

thanks! i’ll let you know when i venture into beta territory. currently having trouble backing up my scenes. might have to manually transcribe :sob:

Ah, I see. Could still be useful, but I would love to enter data into tracker view without the full keyboard :slight_smile:

are the numpad +/- etc different keycodes? i thought you set up aliases for ADD SUB DIV etc?

Yep, I’ve switched all the keycodes over to using the defines from usb_protocol_hid.h

2 Likes

Honestly @tehn, you must have the patience of a saint to have written all the USB saving and loading code. It has driven me completely round the bend. Anyway…

I think I’ve gotten it very stable, but I’m not going to make any of the UI enhancements that have been suggested for the sake of my sanity and in case I chuck something out the window (it’s a long drop from the top of my house).

Instead I present some thoughts and ideas for the poor soul that comes after me.

At the moment the entire functionality is contained in one function that is about 370 lines long. The main task will be to break this down, in particular you’ll want to separate the serialisation parts of the code from the disk handling parts of the code.

I would suggest moving the serialisation code over to the src directory so that you can test it without having to use the module (being tied to the module constantly is what I find hardest…).

Perhaps 2 public functions like this (naturally, each would use many more private functions):

void tele_serialise(scene_state_t *src, char (*dest)[FIXED_SIZE]);
void tele_deserialise(char (*src)[FIXED_SIZE], scene_state_t *dest);

(Given that we know the maximum size of the resulting text file, it would be better to use statically allocated arrays instead of malloc IMO, but hey if you’re writing the code then you choose how you want to do it…)

Then we can leave the nasty file system code in module but hopefully without all the serialisation code in the way it will be easier to grok.

3 Likes

Beta 6 posted in the first post. The less dirty release.

Changes since beta 5.

  • USB saving and loading works at all times, not just at boot up. Your scene should pause while saving and loading takes place. Your unsaved scene should not be effected.

Given that the USB memory stick code works differently now, I’ve removed all of the artificial delays that were previously in code. Can people report back with any problematic USB sticks.

I have one USB stick that doesn’t work with the new code, but it also doesn’t work very well on my Mac either… A working USB stick will display ā€œWRITING.....ā€, then ā€œREADING.....ā€ on the screen.

3 Likes

Thanks for the hard work, Sam!

I’ll try this as soon as possible - just not sure what this means:

So tt saves all active scenes to USB and loads all saved scenes to the device when I insert a stick - just the active scene stays as it is and could be saved later to an empty slot?

Yes. That’s correct. What I’m trying to say (badly), is that you wont lose any unsaved data.

2 Likes

Param can jump between 2 values it the knob is just so (I have just seen this with my own eyes!) and the ADC is picking up a bit of noise.

Just a note that I’ve seen this on my Teletype 1.1 as well, so I do not believe it is a regression.

Not a great image, but I think you can see from this that there’s some issue with the loading from USB:

When I look at the scripts loaded, they don’t match the USB, but thewn they’re still the old TT 1.0 scripts. Any chance its getting confused by the deprecated commands?