Narwhal Posted July 23, 2008 Report Share Posted July 23, 2008 somewhat like the mempot idea except using encoders and better manipulations I suppose. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted July 23, 2008 Report Share Posted July 23, 2008 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 ;) Quote Link to comment Share on other sites More sharing options...
Narwhal Posted July 24, 2008 Report Share Posted July 24, 2008 The code as posted does not work. It's not stable and totally goes nuts if the encoder isn't turning at all. But don't worry I'm working on it. I'll post code and results soon. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted July 25, 2008 Report Share Posted July 25, 2008 It's not stable and totally goes nuts if the encoder isn't turning at allIt shouldn't even be called unless the encoder has moved... I think you made a boo-boo ;D Quote Link to comment Share on other sites More sharing options...
Narwhal Posted July 25, 2008 Report Share Posted July 25, 2008 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 Quote Link to comment Share on other sites More sharing options...
stryd_one Posted July 25, 2008 Report Share Posted July 25, 2008 See, memory like a goldfish... A day after I write it, I forget how it functions ;DI 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 :) Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 5, 2008 Author Report Share Posted August 5, 2008 Here's a minor update to the code. It now runs on 452s again (optionally) and has all the settings like voltage reference in #defines at the top of the source.it doesn't use stryd's cool new logic yet (haven't had a chance to test, but I will, I promise!).main.c Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 5, 2008 Report Share Posted August 5, 2008 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 :) Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 6, 2008 Author Report Share Posted August 6, 2008 You're far too bloody helpful :PI've added and tested your code, works perfectly. It's attached. I'm pretty sure direction should be a signed char though :PTBH 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 Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 7, 2008 Report Share Posted August 7, 2008 I'm pretty sure direction should be a signed char though :PLOL! 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. Quote Link to comment Share on other sites More sharing options...
NidStyles Posted August 8, 2008 Report Share Posted August 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 8, 2008 Author Report Share Posted August 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
Sasha Posted August 8, 2008 Report Share Posted August 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
NidStyles Posted August 8, 2008 Report Share Posted August 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 9, 2008 Author Report Share Posted August 9, 2008 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. Quote Link to comment Share on other sites More sharing options...
NidStyles Posted August 10, 2008 Report Share Posted August 10, 2008 :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. Quote Link to comment Share on other sites More sharing options...
nILS Posted August 11, 2008 Report Share Posted August 11, 2008 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. Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 13, 2008 Author Report Share Posted August 13, 2008 Whoops! found a bug. Thanks to Simon for pointing it out.main.c Quote Link to comment Share on other sites More sharing options...
NidStyles Posted August 15, 2008 Report Share Posted August 15, 2008 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. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 16, 2008 Report Share Posted August 16, 2008 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.JPGHPIM6400.JPG Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 16, 2008 Author Report Share Posted August 16, 2008 Awesome dude :) Thanks for having faith :DI'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. Quote Link to comment Share on other sites More sharing options...
rasteri Posted September 24, 2008 Author Report Share Posted September 24, 2008 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. dOAZybiCOTkThis 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 jobFuture plan is to port the code to a dsPIC... it could load samples from an SD card or something. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted September 24, 2008 Report Share Posted September 24, 2008 Sweet!Can you tell us more about the linux software? Is it uCLinux or ..? Curiosity..... Quote Link to comment Share on other sites More sharing options...
rasteri Posted September 24, 2008 Author Report Share Posted September 24, 2008 I used buildroot to make a root filesystem - http://buildroot.uclibc.org/ - awesome little utility. Then it was just a case of building a minimal kernel with usb audio drivers and shit. Quote Link to comment Share on other sites More sharing options...
Turnthetables Posted October 11, 2008 Report Share Posted October 11, 2008 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.