R_E_C_U_R questions

Hey guys… I have been playing with recur for quite a while now and I am enjoying it. Got a few questions… Gonna start with this one…

I currently have mine set up so that it switch’s to a random point in a random video clip every few seconds. Is there a way perhaps that I could trigger this instead?

2 Likes

Yeap ! If you just have RAND_START_MODE on then every time you press the SWITCH ( → ) key it triggers starting the clip from a new random point

(It’s fun to sync this trigger press to bars in a song - can even sequence this if you connect an external sequencer !)

4 Likes

Sorry in advance for taking the thread in a different direction but since it’s labeled recur questions I figured it’d be a good place to pose a question.

I have an old terminal tedium module I was considering using for video use. I noticed that incur uses an MCP3008 whereas the TT uses an MCP3208-a 12 bit ADC instead of the 10 bit used with incur. How involved would it be to use this setup with the image provided? Would it be as simple as modifying “analog_input.py” to use the MCP3208? Also, since recur is written in python there wouldn’t be any need to recompile anything, correct? Thanks in advance!!

1 Like

I believe that is all you need to do…

I had a very similar experience changing the same sort of things right her :-

also, i really want that module.

1 Like

could i map this to happen from an analogue input do you think, or maybe a gpio pin ? I would like to trigger from my eurorack

Thanks for the info. I really appreciated the info about the different spi channels, I suppose making sure that’s a possibility with the TT would be the first thing to check. Also, the terminal tedium build isn’t that tricky with the only hard to solder part being the WM8731. Hard to believe that’s a 6 year old project at this point.

1 Like

I did a bunch of edits on the build instructions for the TT, mostly on the piCore side of things since that’s what I was most interested in. Small world. :slight_smile:

yeap ! it should be quite easy to map that button to another type of input - in recur all the mappings are done inside json files so you dont even need to write any code to edit these…

here is the keypad mapping where the action switch_to_next_player is mapped to key d , and here is the analog input mapping…

only issue i could see here is that the analog inputs are continuous so usually take a range of values rather than just on/off → you could easily write a small function in the code tho that would check the value of the input and trigger an action if its over a certain amount, like this:

    def switch_to_next_player_trigger(self, amount):
        if amount > 0.5:
            self.switch_to_next_player

(not sure if would need any debouncing logic)

should be pretty simple to set up some gate/trigger logic from reading directly from gpio pins also,

the way i would approach this is to create a new mapping file inside json_objects called gpio_action_mapping

and then new input reading code inside user_input called gpio_input.py:

where it would read from gpio values and then trigger actions based on the mapping (can copy the analog input code and just edit it to work for this)

i believe that this should be possible yes !

the analog_input.py in recur uses the (now deprecated) Adafruit_MCP3008 library - maybe this can be modified to read from mcp3008 ? or a quick google shows a few exisiting python libraries for mcp3208 - i havnt tried but im sure it would be possible to make these work…

thats correct - you just need to edit the python files and then run the code to again to test it…

the other thing to check would be to do with clashing gpio pins needed for recur (ie for the spi display) and the ones used for tt - as @BRock mentioned in their linked thread, the incur circuit uses alternative spi pins so that the display ones are kept free

default tft recur screen uses following pins:

1 , 17 : 3.3v
2, 4 : 5v
11 : TP_IQR (for touch panel)
18 : LCD_RS
19 : LCD_SI
21 : TP_SO (touch panel output)
22 : reset
23 : LCD_SCK
24 : LCD_CS
26 : TP_CS

heres pins usage of TT:

1 Like

Thank you so much for the response and insight!

Yeah, I was afraid of the SPI clash after I did a little research and I doubt an SPI display could keep up with an ADC sampling too.

Thanks again!

it shouldnt be too hard just to route the mcp3208 spi pins to the alternative gpios. but probably wouldnt be as simple as ‘plug and play’ is all. iv looked into terminal tedium before looks like a cool project. its open source also so could create a fork that also has a spi screen on it ! :wink:

oh

my

god!!!

I think i just made it work and it was super easy!!! All i did is change 1 input line in analog_action_mapping.json to this :-

“DEFAULT”: [“switch_to_next_player”, “toggle_player_mode”]

and i get this :-

I think you are right about it maybe needing a debounce @cyberboy666 but i just triggered with the last note in the last bar instead of the first and it looks pretty close to me…

I have a new mixer arriving this week… i will attempt to set up a better demo (captured not with my phone) once i get it

Thanks man!!! Vegetable rights and peas!

It’s silly that I’ve built two of these at this point. It’s certainly a great place to start when looking at pi/euro opportunities although super audio focused. The WM8731 codec used doesn’t seem to have much of a future life though. :frowning:

I’ll continue exploring/thinking about video applications with this module though!

Ok, I’ll load up this thread with alternative use cases with no follow through but I noticed this project and it got my wheels spinning.

Is it possible to run recur’s display from the DSI port? Would it cause all sorts of issues because throughout recur expects the waveshare display? Would that take up too much bandwidth for recur to cope with?

Maybe I should just wait on incur panels to be available but I was attracted to a 5” display and the I/O that was needed to run incur. Largely abandoned my repurpose a terminal tedium because of figuring out a display option.

1 Like

there are files already in github for incur euro panels - only thing was i wanted to experiment with breaking the usb / hmdi plugs out to the panel… not sure how well it fits might have to be an extension panel for these instead… but yes panels for a bunch of stuff will become available soon-ish although not sure when since got some other things w higher priority came up first

this im not sure - never tried since at the time the dsi displays were too expensive for me to test with. (just checked the one in EuroRpi and it is still 5x more than the tft one…) i think in theory it should be possible…

you would need to make some changes to code to switch to another display but shouldnt be too much work. i can help if u are attempting this… dsi displays should take lower bandwidth than the gpio ones

1 Like

Yes, I appreciate that! There just isn’t anyone out here in West Kentucky laser cutting stuff like euro panels and it’s pretty cost prohibitive for a one off panel. Hell, it seems cheaper for me to just wait for you to get a batch of panels in bulk and ship them to the other side of the world! I’d even be down for a group buy to gauge what sort of interest there is, possibly do a preorder to help front costs, figure out whatever is worth your time, and let’s :tada:

It’s like PCBs. I’ve built 200+ eurorack modules but have never ordered PCBs from a fabrication house. I don’t need 5 PCBs, I just want to build the thing. I don’t have time to rehome extras (just like I don’t have time to sell the pile of working DIY modules I’m not using) so I’m grateful to anyone who has the time to do so. It’s a huge effort to put a product out into the world and support it. I know product has a shitty connotation but if you’re stuck to the same capitalist way of life to get the resources to bring a labor of love into peoples lives then fuck it, business it up.

I have the next week off and I plan on dusting off my recur setup to fool around with all of these Syntonie modules I’ve built. So far I’ve been using recurboy with the setup because it’s so easy but getting recur in the case would be huge. I’ve also been thinking about how to save on the number of adapters and add ons that just seems to come with video applications.

With my time off I plan on poking about the image to just see the lay of the land. I’ve been wanting to tinker with something but I’m also a gigging musician with a band and an orchestra gig, 30 private students, and the father of a 16 month old girl - time is a precious resource in my life anymore!

I’ve made a bit of progress getting my own r_e_c_u_r image going but I’ve hit a bit of a wall. I suppose that I should also mention that I’m using a buster image from 2020-05-28 since that’s all that RPi had in their archive still. Maybe all of my questions would be answered if I had an earlier version of Raspbian but alas, here we go.

Errors

This text will be hiddenTraceback (most recent call last):
File “r_e_c_u_r.py”, line 47, in
shaders = Shaders(tk, osc_client, message_handler, data)
File “/home/pi/r_e_c_u_r/video_centre/shaders.py”, line 16, in init
self.shaders_menu_list = self.generate_shaders_list()
File “/home/pi/r_e_c_u_r/video_centre/shaders.py”, line 25, in generate_shaders_list
raw_list = self.shaders_menu.generate_raw_shaders_list()
File “/home/pi/r_e_c_u_r/display_centre/menu.py”, line 200, in generate_raw_shaders_list
self._add_folder_to_shaders_list(path, 0)
File “/home/pi/r_e_c_u_r/display_centre/menu.py”, line 207, in _add_folder_to_shaders_list
root, dirs, files = next(os.walk(current_path))
StopIteration

I guess it’s hitting a wall coming up with a list of available shaders? I’ve been following the directions in the dotfiles but so far I’ve avoided all of autostart stuff (more or less just skipped the “quiet x and run my launcher script on boot” section). I don’t think this is required, since the error I’m getting is file system stuff, but I just wanted to rule that out.

I’ve found the defs in actions.py that switch the screen and I found the DEV_MODE_RESET flag (which gives me hope that it should run without the TFT screen attached) but I’m not too sure how to utilize that. I assume that if I can get past this file system stuff that it would realize there’s no screen attached and enter dev mode.

Any guidance is appreciated and thank you!

sounds like you are making good progress - im sorry that the documentation on this process is not as good as it could be… lots of new things were added to the recur project after its initial release and didnt all get accounted for in those notes…

once you get the program running you should be able to switch to DEV_MODE in the settings under systemDEV_MODE_RESET

i think the issue here is that the code is expecting to find a folder called Shaders in the /home/pi/ dir to load the list of shaders you can select…

this is a list of all the places the code will look for shaders in:

self.PATHS_TO_SHADERS = [self.PATH_TO_EXTERNAL_DEVICES, '/home/pi/r_e_c_u_r/Shaders', '/home/pi/Shaders']

you could try making folders here or just remove these from the list to see if that helps.

im not too sure why it is throwing an error tho - just from looking at this code if it doesnt find the folder (for example on the external device) it should just move on, not throw error… so this could be due to something else… but let me know how it goes and i can continue to help from there

btw the latest version of recur is made from the DEV branch so if you pulled the code from github you should git checkout dev to get this code (its not obvious btw i should merge this to avoid further confusuin)

1 Like

Thank you so much helping me troubleshoot. Maybe it’s a good thing to see how others fail 2023 to see the state of your project? I’m really starting to understand why everyone says the pi3 video projects are no longer in an active state of development-bullseye completely nuked the existing video ecosystem. Hey, the more you know!

Good news, switching to the dev branch causes a boatload of OSC/MIDI/Keypad commands to be printed out into terminal but unfortunately it still hangs up with populating the shaders. I tried commenting out some stuff but then python is missing arguments in functions and it isn’t happy. I’ve had a bit of luck running it in Thonny in that tk generates a window, and I get bit more info in the console output. But I really don’t have much experience with python at all so I’m also facing a bit of a learning curve.

Thanks for clarifying the DEV_MODE option. I may try fooling with my working r_e_c_u_r build with the TFT screen to get the dev mode going and swap SD cards to my setup with a DSI display. At least I’ve got some options now!

Not really a question but an update. Got it working on this dsi display! I got to the dev mode setting with the dsi display attached, rebooted with the gui on the dsi, removed the hat display and was still seeing the gui on the dsi.

At least I’m to a working place! Also, this revelation brought to me by my daughter’s almost two hour nap.

3 Likes