8 days later
giuliomoro changed the title to [Solved] USB vs Analogue in/outs .
giuliomoro changed the title to USB vs Analogue in/outs .
5 years later

@tkay

To copy that file you could:

  • copy the core/default_libpd_render.cpp file into your project. Assuming you have a project called PROJECT_NAME, you can do this by pasting this in the console at the bottom of the IDE:
    cp /root/Bela/core/default_libpd_render.cpp /root/Bela/projects/PROJECT_NAME/render.cpp
    and hit enter.
  • then you can edit the newly created render.cpp file using the IDE editor following the instructions above.
  • last, the Pd patch in the same project will need receivers such as [receive keyup] and `[receive key]
giuliomoro changed the title to USB keyboard vs Analogue in/outs key matrix .
a year later

see this example ready for use: https://github.com/giuliomoro/bela-pd-keyboard. Note that only some keys are mapped to Pd all numbers and lowercase letters are mapped, and also these:

        COMMA , \
        DOT . \
        SLASH / \
        SPACE " " \
        ENTER "\\\\n" \
        SEMICOLON ";" \
        APOSTROPHE "\\\\'" \
        KPASTERISK "*" \

If you see keys that do not work, you need to add them to this list in generate-parse.sh and run the script before rebuilding your project.

Nice! Thanks so much. One thing though, I was planning on using a number keypad, not a full keyboard and it seems only the asterisk works. How exactly do I add these keys to the working parse? I saw generate parse file, but didnt quite know how to add these. Where can i see the Input event codes?

OK I updated the files in the repo to include the numpads and some more keys. If a code is not recognised it will now be printed to the console. You can then go to /usr/include/linux/input-event-codes.h (e.g.: https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/input-event-codes.h , but better on the board itself) and figure out what's the name of the KEY_ macro corresponding to that event. You can then (probably) add that with some care to the pairs array in generate-parse.h.

Anyhow, for now the numpad should work. Try it out.

6 days later

If this works with Pepper too, it's exactly what I was looking for!