Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulate the Teletype module (phase 1) #11

Closed
52 of 60 tasks
Dewb opened this issue Dec 6, 2017 · 14 comments
Closed
52 of 60 tasks

Emulate the Teletype module (phase 1) #11

Dewb opened this issue Dec 6, 2017 · 14 comments

Comments

@Dewb
Copy link
Owner

Dewb commented Dec 6, 2017

https://monome.org/docs/modular/teletype/

TODO:

  • Create module and widget definitions
  • Emulate OLED screen
  • Handle keyboard input when the screen is clicked in rack
  • Pass GLFW keyboard events to firmware as HID frames directly to process_keypress
    • Alphanumerics, function keys, arrow keys, tab, function keys, minus/equals/period, backspace
    • Shift/Ctrl/Alt/Meta modifiers
    • Semicolon/colon
    • Escape
    • NUM LOCK
    • Hunt for and fix any remaining special keys
    • Support non-US keyboards (needs fixes in Rack, coming in 2.0) (future)
    • Combos that still aren't working
      • shift for multiline select in script editor
      • ctrl-left/right for jumping between words
  • TR outs
  • CV outs
  • Trigger ins
  • IN CV input
  • PARAM knob
  • M Metro
  • Script execution and editing
  • Pattern editing
  • Enter Scene Mode via ESC
  • Enter Scene Mode via front panel button
  • Basic saving/loading
    • Naive load/save NVRAM to VCV Rack patch
    • Naive load/save VRAM to VCV Rack patch
  • Advanced saving/loading (moved to phase 2 Teletype (phase 2) #62 )
    • Right-click export/import all scenes to/from file
    • Right-click export/import single scene to/from file?
    • Save NVRAM (and VRAM scene state?) as JSON rather than memory buffer, for more version-independence
    • VCV Rack 2.0: take advantage of new patch format to avoid hitting patch JSON size limits
  • Desirable VCV-specific features
    • 'Initialize' command should reset scene (and NVRAM?)
    • Support locking the keyboard (or a second keyboard?) to TT input. Does VCV even allow this? (future)
  • Run through all Teletype Studies
    • Part 1: Navigating and Making Edges
    • Part 2: Curves and Repetition
    • Part 3: Playing with Numbers
    • Part 4: Collect and Transform
    • Part 5: Pattern Tracking
      • param knob live input fail: no way to hold ctrl and turn param knob (clicking steals focus from edit window) workaround: map a midi control knob
    • Part 6: Maybe Later Remembering
    • Part 7: Incantations
      • (except for i2c )
  • Test all 2.1.0 ops
  • i2c
    • Make sure i2c ops fail gracefully / don't crash
    • Investigate passing i2c messages to other modules via VCV Rack module-expander API (investigation and prototype complete, full implementation to come post-Rack-2.0)
  • Update Teletype firmware to 3.x
  • Grid
    • Test grid ops and interaction with onscreen grid
    • Test attachment to virtual grids
    • Test attachment to real grids via serialosc
      • Noticing some occasional lag
  • Test other new 3.x ops
  • Update Teletype firmware to 4.0 (once it's out of beta)
  • Test new 4.x ops
  • Finalize panel graphics (future)
  • Merge back into main branch
  • Address unknown unknowns (always more on the horizon of course)

teletype-rack-1

@Dewb Dewb changed the title Teletype module Emulate the Teletype module Dec 6, 2017
@phdsg
Copy link

phdsg commented Dec 6, 2017

OS: win (mingw64)
Rack: dev
Plugin: dev (teletype branch)
tried to check this out, i get this build error:

@phdsg
Copy link

phdsg commented Dec 7, 2017

module builds fine. the firmware doesn't.

cd firmware && make -f teletype.mk
make[1]: Entering directory '/h/devel/vcv/rack-master/plugins/monome-rack/firmware'
make[1]: *** No rule to make target '../build/firmware/teletype/src/match_token.c.o', needed by '../build/firmware/teletype.dll'. Stop.
make[1]: Leaving directory '/h/devel/vcv/rack-master/plugins/monome-rack/firmware'
make: *** [Makefile:38: firmwares] Error 2

when i load the module in rack, console shows this:

[info] Creating new temporary firmware instance at H:\devel\msys64\tmp\s5io.1\monome_vcvrack_firmware.dll
[warning] Failed to load library H:\devel\msys64\tmp\s5io.1\monome_vcvrack_firmware.dll: 193

also causes crashes, when rack is autosaving.

[info] Saving patch ./autosave.vcv
make: *** [Makefile:57: run] Segmentation fault

leaving a corrupted autosave.vcv that pops up a json error on next rack start.

@Dewb
Copy link
Owner Author

Dewb commented Dec 7, 2017

The Teletype branch is probably not going to build consistently on all 3 platforms until it gets further along. I’m primarily developing on OS X.

@davephillips
Copy link

davephillips commented Dec 8, 2017

Linux Fedora 23
Rack master

Just a note to let you know where the Teletype build stands on Linux. Getting closer now. Very exciting stuff you're doing here ! :)

cc -DNULL=0 -o0 -D__AVR32_UC3B0512__ -Werror=implicit-function-declaration -Imock_hardware -Imock_hardware/stubs -Iteletype/libavr32/src -Iteletype/libavr32/src/usb/hid -Iteletype/libavr32/conf -Iteletype/libavr32/conf/teletype -Iteletype/libavr32/asf/common/services/usb -Iteletype/libavr32/asf/common/services/usb/uhc -Iteletype/libavr32/asf/common/services/usb/class/hid -Iteletype/src -Iteletype/src/ops  -c -o ../build/firmware/teletype/module/pattern_mode.c.o teletype/module/pattern_mode.c
In file included from mock_hardware/stubs/conf_usb_host.h:1:0,
                 from teletype/module/keyboard_helper.h:8,
                 from teletype/module/pattern_mode.c:5:
mock_hardware/stubs/compiler.h:1064:0: warning: "__always_inline" redefined
 #define __always_inline     inline __attribute__((__always_inline__))
 ^
In file included from /usr/include/features.h:365:0,
                 from /usr/include/stdint.h:25,
                 from /usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/stdint.h:9,
                 from teletype/module/pattern_mode.h:5,
                 from teletype/module/pattern_mode.c:1:
/usr/include/sys/cdefs.h:307:0: note: this is the location of the previous definition
 # define __always_inline __inline __attribute__ ((__always_inline__))
 ^
make[1]: *** No rule to make target '../build/firmware/teletype/src/match_token.c.o', needed by '../build/firmware/teletype.so'.  Stop.
make[1]: Leaving directory '/home/dlphilp/src/Rack-master/plugins-extra/monome-rack/firmware'
Makefile:37: recipe for target 'firmwares' failed
make: *** [firmwares] Error 2

@davephillips
Copy link

A little more information for you. The match_token object isn't building because the build apparently wants avr32-gcc as the compiler. Fedora 23 does include avr-gcc, avr-binutils, avr-gcc-c++, avr-libc, and avr-gdb. Alas, as far as I can tell, there's no support for i386, only x86_64. Is the 32-bit compiler required for a Linux build ?

@Dewb
Copy link
Owner Author

Dewb commented Dec 9, 2017

That's odd. It shouldn't be building with avr32-gcc, it should be using x86_64 like the rest of the plugin (and Rack itself.)

I appreciate the feedback on the teletype branch, but just to warn you, building it isn't going to get you much right now—just the picture you see above. [EDITED: here is the 2017 version of the picture for reference]

screen shot 2017-12-06 at 12 56 59 am

The screen is being drawn by the module code, but without keyboard input and more GPIO work it isn't going to do anything. I'm probably going to put the teletype work aside for a bit to focus on getting the trilogy modules and the grid connections robust and releasable in binary form for everyone.

Here's the release plan:
https://github.com/Dewb/monome-rack/projects/1

@davephillips
Copy link

Thanks for the response, and no problem, I'll just be checking in now & then to see where you're at with things. I read the release plan, you've got a lot on your plate there. :) Meanwhile I have the monome/whitewhale to learn, so I'm happy to keep busy with that combo.

@Dewb
Copy link
Owner Author

Dewb commented Jul 13, 2020

The teletype branch has been updated for Rack 1.1.6, and is now functional enough to do basic operations. Experimental teletype builds are available for Windows and macOS on the releases page. Still a lot of nonworking features (see checklist.)

@Dewb
Copy link
Owner Author

Dewb commented Jun 16, 2021

Metros, most keystrokes, load/save work now. I was able to run through studies 1 & 2 without issues.

@davephillips
Copy link

Hi Michael ! I'm pleased to hear about the tt update and I've successfully built the tt2020 branch. Alas, I have a library load problem when invoking the module in Rack 1.x :

[19.791 info src/common/FirmwareManager.cpp:195] Loading module firmware from ./plugins/monome-rack/res/firmware/teletype.so
[19.792 warn src/common/FirmwareManager.cpp:214] Failed to load library ./plugins/monome-rack/res/firmware/teletype.so: ./plugins/monome-rack/res/firmware/teletype.so: undefined symbol: process_keypress
[19.792 warn src/common/FirmwareManager.cpp:262] Could not load firmware teletype

Any suggestions ? I'm now building on Ubuntu 18.04, GCC 7.5.0.

@davephillips
Copy link

Problem solved, I updated the firmware submodules, all seems good now. Sorry for the noise.

@davephillips
Copy link

I'm running through various tutorials, so far things seem to work like the hardware (which I don't own and have never used). I'm trying to figure how to run scripts, I'll let you know how I fare with it over the next couple of days.

@Dewb
Copy link
Owner Author

Dewb commented Jun 18, 2021

To run script 1, you can hit F1, send a trigger to trigger input 1, or execute SCRIPT 1 In Live view. This development tracking issue is not the best place to discuss the module behavior in general, your questions and feedback would be welcome in the monome thread on the VCV Rack forum

@davephillips
Copy link

Thanks for the info, Michael, and I will join that discussion.

@Dewb Dewb changed the title Emulate the Teletype module Emulate the Teletype module (phase 1) Sep 27, 2021
@Dewb Dewb closed this as completed Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 1.0.0-alpha1 (2021-09-19)
Development

No branches or pull requests

3 participants