hello folks,
I’m having trouble figuring out how to use the custom object. I’ve got no idea what I’m doing and would like to incorporate an as5600 magnetic encoder using I2C into a project. Any help would be greatly appreciated.
Hi, that’s a cool IC! What readings would you want to get from it, like 0 to 360 degrees?
In short, you’d create a custom object that sends the right commands to the thing, I’ll set up some sort of template for the low level thread which i can send you later. Would be a good idea to actually include a template object in the library so people can customize it to whatever devices they want to talk to.
Then it would be up to you to consult the datasheet and put together a series of commands to configure the thing and then read its values. I’ve never heard of such an IC but a quick look at the datasheet shows a list of commands and how to set it up:
I assume you’d have to send commands setting values in some of those “configuration registers”, then continuously read the “output registers” to get your degree values.
Thanks a bunch for the reply, i currently have it setup to output an analogue value like a pot and it’s ideal for some parts of my patch. but I’d like to derive speed and direction info from it. if there’s a way to get this info from it’s current setup that would be awesome but I can’t think of how to do it.
I’m using this breakout board
bridging the GPO and VCC pins gives an analogue signal at OUT.
Would it perhaps be beneficial to share the current patch as a reference for what I’m trying to achieve? if so I’ll send it over when I’m home.
So the voltage just cycles between GND and VCC for a 360 degree turn? If so if looks like you don’t need to talk to it using I2C and you can do some math inside the k-rate tab to figure out the direction and speed.
yes! cowabunga. I’ll send some more info later on. perhaps a video too.
Please bare with me, I’m new to visual programming, I’ve played around in Pd a bit but nothing outrageous, I am however an avid modular synthesiser enthusiast which is why I’ve fallen in love with the ksoloti platform. Congratulations, its awesome.
I’ve attached some vids in an effort to explain what I’m trying to achieve. Sorry, perhaps I should have led with this explanation in the first message.
So, its a digital scratch box idea where the platter is conductive and setup as a capacitive touch switch. The as5600 magnetic encoder is attached to the bottom of a bearing housing. Through the platter is a bolt, on the end of which is the magnet for interfacing with the as5600.
It kinda works how id like but not quite. Once the as5600 reads a full rotation (visible on a disp object) the sample cycles back to the beginning. Ideally id like the platter to scrub through the sample, reaching the end and not cycle back to the start of the sample (same in reverse) but I’m stuck on how to do it.
Another problem I have, I’d like for scrubbing to follow the sample as if the platter was driven. currently when scrubbing is enabled it picks up where you left off the last scrub… (difficult to explain)
I thought direction and speed data might solve my problems but really I’ve got no idea what I’m doing hahahaha.
Here’s the patch.
Any advice would be greatly appreciated.
scratch basic.axp (19.8 KB)
You would probably implement some kind of speed and direction measurement, with special cases if the ADC value wraps over in each direction. I obviously can’t test it, it may just not work.
scratch basic_speed.axp (21.3 KB)
Then you would have a phasor, normally incrementing at a speed of “1” unless you press the “manual scratch” button, then it would stop and increment/decrement phase according to the turntable movement.
This phasor would then drive the sample position.
I haven’t found such a phasor or set of objects yet.
Hey up, the calculate mag speed object you made works a treat. Thanks.
I managed to put together a phasor that works how I want. Still more pieces of the puzzle to put together.
Again, thanks for the help.
That’s a bit surprising to be honest that the thing works as intended. Did you have to tweak the threshold?
I’ve played about with it for a couple of evenings back and forth with other ideas in getting the results i want. left the threshold at 1000. seems fine.
thank fuck for that.axp (33.3 KB)
Wow, amazing project !!! Can’t wait to see the finished product.
Little question tho, would you mind explaining me that part of your patch :
(oups, sorry for the cursor in my screenshot)
hahaha, the divide object? well spotted. That was from an earlier version, I was playing with different ramps/phasor stuff to drive playback. Must have been a quick ramp that I wanted to slow down Its no longer needed and I forgot to take it out. does that make sense?
Well actualy it was the combinaison of both objects but more specificaly on the conv one. It might be a dumb question but what is the purpose of converting krate data to srate ?
To be honest, I didn’t give it much thought, the table is for audio playback and I needed to “scrub” the position with Krate info so slapped a conv on there.
Oh ok yes, it makes sense…
Btw I found this post in the old forum that might interest you : Sample Scrubber - Patching - Axoloti Community
No Way, yeah that could’ve saved me a bit of time at the beginning. Oh well, got there in the end. Everything is running absolutely fantastically now. I’ll post a vid at some point of it in action.
Yes please !!
As promised… https://youtu.be/cwLbuZYqVu0?si=fXz7tmD2fuUYcfew


