Jump to content

Scratch wheel


rasteri

Recommended Posts

  • Replies 208
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Well yeh, I was basically thinking, a linear sequencer with a few very short sequences, EG 2 seconds would be ample to record a crab on the fader, then you can press a button to play it, and/or loop and manipulate it as it plays.

I prefer analog turntablism; so I reckon if you're gonna have new tools, it makes sense to do something new with them, otherwise you're better off sticking with vinyl ;)

Link to comment
Share on other sites

Well the whole purpose of the first if:

if (!((oldsensor1 ^ sensor1) & !(oldsensor2 ^ sensor2)) )

is to figure out of the wheel had been turned.  It should be this though:

if  ( (oldsensor1 ^ sensor1) | (oldsensor2 ^ sensor2) )

I got it working last night and it is quite fast.  There are exactly 512 state changes using a 128ppt encoder, when I spin the wheel a complete turn, I get exactly 512 on the LCD.. NICE!

If I spin the wheel at the fastest, the highest MaxInc on the LCD I get is 0x30.  This is how many state changes are counted during 1 timer interval.  You need to spin the encoder as fast as you can to see what its limits are.  By adjusting the timer delta to a shorter interval you can tune this value down.  Longer timer intervals will cause this number to increase.  The idea being, that you never want this value to get anywhere near having its high bit set with the fastest spin you can possibly put on the encoder.  As you approach 0x80 you run the risk of your increments appearing to be decrements.  But you can increase the timer interval so it interrupts less often to run the timer function.  There is plenty of headroom right now to support even higher ppt encoders.

I've attached the new main.c that is set to use an encoder that is attached to the pic's port C (J10) via pins RC4 (23) and RC5 (24).  It's a lot like the encoder speed test, except that I don't yet have adjustments for speed.

main.c

Link to comment
Share on other sites

See, memory like a goldfish... A day after I write it, I forget how it functions ;D

I was actually thinking of calling it a different way but that works!

[me=stryd_one]does the "it's working" dance[/me]

I think you guys oughta be using the new structure though...makes it a lot easier to try the new .c files too :)

Link to comment
Share on other sites

  • 2 weeks later...

As well as being about 10* faster (= more decks and/or more accurate), If you're searching for codespace... that logic is a good way to get a couple hundred lines of code back too :)

The algo should drop right into your code too, the original that I wrote was based on your app. I'd be happy to make up a mod for you to upload and test.

While I'm at it, I can also make this app work with the new MIOS structure... There's nothing to it really, just fix up the includes and use the skeleton's makefile :)

Link to comment
Share on other sites

You're far too bloody helpful :P

I've added and tested your code, works perfectly. It's attached. I'm pretty sure direction should be a signed char though :P

TBH the code ran fast enough anyway, even with a 2048 step wheel (attached), but I could see it being a problem when buttons and stuff get added.

If you wanna convert it to the new MIOS structure, knock yourself out. I haven't downloaded it yet. I hate having a job...

encoderwheel0.5mm.pdf

Link to comment
Share on other sites

I'm pretty sure direction should be a signed char though :P

LOL! You might be right ;)

Edit: BTW the reason it's not signed is that my draft version used 1 for forward and 0 for back. That saved two clock cycles but you only lose them elsewhere so I ditched it.

TBH the code ran fast enough anyway, even with a 2048 step wheel (attached), but I could see it being a problem when buttons and stuff get added.

If you wanna convert it to the new MIOS structure, knock yourself out.

Well here's the thing - the encoder driver should really be a mios module, so it can be included in other apps easily :) Also, why stop at one deck? Hey, why only decks? It could be a scrubwheel for a linear sequencer or the likes... I can think of lots of uses.

This lines up with what I was saying in the traktorizer thread about you DJ guys pooling your resources. It's kinda madness to have three dudes working on the same thing at the same time and not working together. Moving to the new structure will make that a LOT easier, it'd definitely be my first move.

If you've not upgraded yet maybe it's not a good time... But I'd have that pretty high on my list if it were me :) Give me a shout when you're ready and I'll go ahead, it should only take a short time.

Link to comment
Share on other sites

Just out of curiousity on this project. What about pitch control?

The set-up I'm working on uses a Laptop running Traktor and looking for some sort of MIDI controller I can use to scratch and cue, but still use the analog mixer I have. The only way I see it working without using two soundcards out of the laptop, which is not feasible.

Basically the set-up would be with 2 MIDI controllers like this, my laptop running Traktor, and the AEM-100i. I want to be able to use a headphone for cue purposes and have the outputs coming through the mains out of the AEM...

I'm not asking for it to be done for me, just looking for some guidance on getting where I want to be with this. I've looked at the 'Commercial' offerings, and the only one that fit's what I'm looking for is the Denon DN-S5500. That's a lot of money though. I'd rather try my hand at this and learn something from it. ;)

I looked at the Traktorizer one, but then I found this one, and this one seems more capable of doing what I am looking to do with it.

I'm new to this digital world of DJing, and the only work I really have done with MIDI is from synths and drum machines. No programing it or anything of this nature. I have programming experience using C/C++, and a little ASM. Never done any PIC before, but from what I can see it's very much the same.

Link to comment
Share on other sites

What is the limitations of this controller? (stryd`s mod) I mean, what is the number of supported i/o without sacrificing the encoder performance? I hope PIC could do much more than it is doing right now with encoder, fader and few buttons.

Link to comment
Share on other sites

Adding another fader would be really easy. We're talking another 6 lines of code. And coz it's just a pitch fader you can use a cheap crappy one.

Then my only other question would be on the resolution. I mean say I was to set it for around +/-5% or something around that range, what could I expect for the actual resolution? I know the software would most likely effect that, but as far as actual signal output I would expect it to be adjustable and pretty refined at lower +/-%'s. Just trying to get an idea of what I'm in for, and how I should go about this.

Thanks for the help.

Link to comment
Share on other sites

Then my only other question would be on the resolution. I mean say I was to set it for around +/-5% or something around that range, what could I expect for the actual resolution?

Well, you get 128 steps, so over a +/-5% range that'll give you an accuracy of 0.078%. That's probably good enough - numark TTX turntables are less accurate (0.1%) and they're usable. Just.

Link to comment
Share on other sites

:D NuMark TTXs. That's riot. I stopped DJing in the 90's when they started releasing decent DDTTs. Never used one, so I can't comment. I'm a Tech man, always will be I guess.

As for digital though I was looking at the Denon, and Pio offering's having resolution down to .02% at +/-4%. .07% is workably good though.

Thanks for all the replies.

Link to comment
Share on other sites

You can get 10bit resolution (1024 steps) off the pitch-fader if Traktor can take that.

Sasha: If you put a little effort into timing you can easily use a pair of these in a traktorizer.

Supposedly Taktor supports 14bit MIDI. I have read of examples of people having issues with it reading that high though. Something with the VCI-300 apparently, and Taktor Not reading anything over 7bit. I have no idea how this would translate in the software used in the Scratch wheel, or anything else. I haven't even taken a look at the code yet. Been swamped at work like usual.

Link to comment
Share on other sites

Some pictures of the box and a little sideview. Sorry for the bad quality of the pictures (my digicam is simply crap) and the poor drawing :)

I'm still looking for conductive paint, couldn't find any, does anyone know in which kind of store I should look for it, in germany?

Some things I'd like to add is a little power LED which woun't be a problem but I'll try to design it like the speed calibration strobe of an real turntable and maybe one or two real cool looking buttons but thats future stuff.

Simon

HPIM6398.JPG

HPIM6400.JPG

3439_sideview_jpg1706ce7295678aa5987933d

Link to comment
Share on other sites

Awesome dude :) Thanks for having faith :D

I'm still looking for conductive paint, couldn't find any, does anyone know in which kind of store I should look for it, in germany?

It's quite often used for shielding guitars, so maybe try a guitar repair store? Electronics stores probably would sell this sorta thing too, what about that Reichelt place you Germans are always going on about?

As a last resort, car repair shops often sell tiny overpriced bottles of conductive silver paint for repairing the rear windscreen heater.

Link to comment
Share on other sites

  • 1 month later...

Here's a quick vid of the latest iteration - it has an SBC inside running linux, and runs a simple scratch program, playing audio on a teeny USB sound card out some headphones. It sounds crappy and has suddenly developed tracking problems for some reason, but it's still pretty fun to play with.

dOAZybiCOTk

This is the SBC I'm using - http://www.dsl-ltd.co.uk/productspec.aspx?ProdID=ICOP-6116 - it's got a few samples loaded in to a 1GB diskonmodule. Hopefully it should be battery powerable, with a max712-based charging circuit. It's gunna be a while before I have enough time to do any more work on it though... damn job

Future plan is to port the code to a dsPIC... it could load samples from an SD card or something.

Link to comment
Share on other sites

  • 3 weeks later...

rasteri, I love your Scratch wheel keep up the great work! I happened to stumble upon one of your youtube vids one day and I wanted to see how it worked, Now I'm here! I'm in the process of acquiring the hardware right now, I'm going to build the core module as I would for a regular midibox, so is there anything that I should change as of your schematic on picasa? Did you ever get around to making a new schematic? What about does it work with Torq 1.07?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...