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?

1 Like

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 !)

3 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!