monome / teletype

monome eurorack module
GNU General Public License v2.0
199 stars 83 forks source link

scenes with `#` in description don't load properly #104

Closed scanner-darkly closed 1 year ago

scanner-darkly commented 7 years ago

if a scene has a # character in the description when such scene is loaded everything after the # will not be read, including all of the scripts.

burnsauce commented 7 years ago

Given that # is reserved in the teletype scene file syntax, I presume that the fix should be to disallow # in the scene description?

samdoshi commented 7 years ago

Sounds like that's what we need to do until we rewrite the USB code.

It should be as simple as adding a branch to match # in process_preset_w_keys.

scanner-darkly commented 7 years ago

perhaps a better option would be to allow entering it but replace it with something else at that point (a space?), not just ignore it - otherwise it might look like keyboard is not working, and there is no messaging provided to the user to clarify what's going on.

cmcavoy commented 7 years ago

I looked for existing C serializer libraries we could leverage. I couldn't find any that seemed usable, but did see mention of using /* */ for comments in this implementation. Could we use an alternate comment format in TT scripts?

It's going to take me a while to understand the constraints around embedded development, but my first idea reading this thread was to leverage an existing serializer, doesn't sound like it's possible here - the embedded world is fun to learn.

samdoshi commented 7 years ago

I think discussions here are being overtaken by discussions at:

https://llllllll.co/t/teletype-firmware-usb-disk-mode-interface/9442

We are currently contemplating switching from a text file format to a binary format.

jlmitch5 commented 6 years ago

perhaps a better option would be to allow entering it but replace it with something else at that point (a space?), not just ignore it - otherwise it might look like keyboard is not working, and there is no messaging provided to the user to clarify what's going on.

My guess would be someone would be typing the # key because they are trying to document the script. i.e.:

#1:
foo

#2:
bar

#3:
baz

In that situation I don't really think replacing # with anything would really make sense to the user. My gut is that just not responding to the character press is probably the least invasive action to take pre-changing all the big, serializer changes.

cmcavoy commented 6 years ago

Can someone point to the serialization / deserialization code? Just curious to see it but have had trouble finding it in the source.

scanner-darkly commented 6 years ago

@cmcavoy https://github.com/monome/teletype/blob/master/module/usb_disk_mode.c