Jump to content

rasteri

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by rasteri

  1. 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.
  2. 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.
  3. There's a double-res encoder wheel here : http://www.midibox.org/forum/index.php/topic,11167.msg97570.html#msg97570 Inkscape is great for drawing this stuff. I have a bunch more wheels of different sizes + resolutions, just went to a print shop one day and printed out loads. I really need to make a website to hold all these files and stuff. Or get wiki upload access...
  4. 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
  5. Actually it's 0.75 * 5v, the comments in the code are misleading.
  6. I dunno why the new version isn't working, maybe the voltage reference is not suitable for your photodiodes? Grab the newest (0.025) version of the code, it lets you adjust the voltage reference at the top of the source (COMPARATOR_THRESHOLD). Maybe try setting it to 0x07? If you just can't get pins 4/5 working at all, the new version also lets you revert to the old ADC behaviour (i.e. using pins 3/4) but still use the touch sensor. Uncomment the line that says #define USE_ADC_ENCODER. (you can also change the threshold for that should you so desire) Check the other thread http://www.midibox.org/forum/index.php/topic,11167.msg97390.html#msg97390 for the new code
  7. 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
  8. Try it with some other value resistors in a circuit on its own - 500, 1k, 50k, 100k, etc. Try connecting it the other way round (with the common pin to ground and the resistors going to +5v). Or try another photodiode (if you're anything like me you have dozens of old mice lying around). Just try stuff! That's what I did :P
  9. The voltage should go up a lot more than that, in my case low is 1.5v and high is 4v. I don't really know what the problem could be. Try it in a bunch of different test circuits and stuff - e.g. maybe it wants ground instead of 5v at its common pin (i.e. stick it in the bottom half of the voltage divider), maybe it wants a different resistor value, etc. It's weird though, it looks IDENTICAL to the one I'm using... EDIT: Also check the LED is working and wired up properly
  10. Bank select is the crossfader. Are you sure you have the photodiodes in pins 3 and 4? You had better ground pin2 as well, that could be causing it.
  11. awesomeness, I'll give it a go.
  12. I don't think serato supports external midi controllers for scratching. I think the best it can do is map midi buttons to functions in the software, but don't quote me on that. As for a guide, there's enough info on the wiki page (http://www.midibox.org/dokuwiki/scratchcontroller) and other midibox pages for you to figure it out. I realise this might be hard if you've never built a midibox before, but the people on this forum are unbelievably helpful, and I'll try and help you as best I can if you give me a shout. A complete start-to-finish guide will be written eventually.
  13. EXACTLY what I needed. Thanks! EDIT: so something like... unsigned char interpolate(unsigned char a, unsigned char b, unsigned char i) { PRODL = a; PRODH = i; __asm movf _PRODL, W mulwf _PRODH, 0 __endasm; a=PRODH; PRODL = b; PRODH = 255-i; __asm movf _PRODL, W mulwf _PRODH, 0 __endasm; b=PRODH; return a+b; } This is untested (I'm at work!). Seem correct/efficient?
  14. I'm not great at programming or math, so forgive me for the dumb question. Is it possible to write an entirely 8-bit interpolation algorithm? Eg : You have two unsigned chars a and b, with values 100 and 200. You also have an interpolation factor i, between 0 and 255. When i=0, output=100 (a) when i=255, output=200 (b) when i=127, output=150 I'd prefer it not to use integers or floats... (as you might have guessed, I'm thinking 8-bit variable speed sample playback... if there's another way to do this, I'd like to know!)
  15. I've started to write a howto in the wiki (it's still a long way from being finished) : http://www.midibox.org/dokuwiki/scratchcontroller
  16. You can adjust the angle of the fader relative to the user just by rotating the entire device. The scratch wheel doesn't care what angle you come at it from. The device wasn't really designed with any "ideal" orientation in mind. Anyway, If the fader wasn't parallel with the front edge of the case, it would mean it could only be comfortably used by either left-handed OR right-handed DJs, not both. If you get me. And yeah, the levels from the sensors didn't always hit 0. Probably fixable with circuitry tweaks, but being able to adjust the threshold is useful anyway I guess.
  17. Some pics : (http://picasaweb.google.co.uk/rasteri/Scratchtroller) Not pretty looking, but pretty damn functional :P
  18. Have some code. (Note the encoder now needs to be on pins 4&5, and it requires a PIC with comparators). main.c
  19. This pic explains all : (http://picasaweb.google.co.uk/rasteri/Scratchtroller/photo#5216080813603959586) That's an older design, from when I was planning to use an aluminium disc as the scratch wheel, but the principle is the same. The vinyl is held between 2 nuts (with washers) on an "engineering stud", which is a threaded rod with a smooth non-threaded middle section. The non-threaded part makes contact with the brass bush, which is in turn connected to the PIC. I wasn't sure if it would work, but it's perfect :) Whether it'll still work in a few months time is a matter for debate however...
  20. Heh, Gizmo from skratchworx has been really cool about it. I'm gunna send him one for testing, see how it holds up to other DJ controllers. Just a few updates. The non-cardboard version is up and running, using a real piece of 7" vinyl sprayed with conductive nickel paint. Also, the photodiodes now use the comparators of the 18f4620, so it tracks perfectly no matter what. This opens the possibility of a higher resolution wheel, but means 18f452s can't be used. (who cares) I'll post pics/vids/code as soon as I can. Probably about time I improved the wiki page too.... Future plans include making the unit completely standalone. I've already got 8bit 22khz sample playback working (kinda sorta), just need to figure out if the PICs are powerful enough to allow scratching (probably not). A couple of dsPICs are on their way, maybe they can be used?
  21. RS components have these : http://uk.rs-online.com/web/search/searchBrowseAction.html?method=searchProducts&searchTerm=467-6099&x=15&y=16 I think they might be the same as the farnell ones
  22. Those LEDs are lighting up in the correct pattern. That means the encoder wheel itself and optical components must be fine. The signal must be getting to the PIC OK too. I reckon it must be a software problem - maybe try writing a simple test app? I have no experience with MB64E, for the scratch wheel I wrote my own C program. And I'm not using DINs for encoder inputs (shift registers don't switch fast enough for scratching...) Either that or you just have the encoder connected to the wrong input pins of the switch register, or something. (I guess it must require the encoder to be on a certain pair of pins)
  23. 'Fraid I need electrical contact with the wheel - the metal surface acts as a big capacitive touch sensor.
  24. I've been designing a more robust version of the device. The scratch wheel will be made out of aluminium or something, attached to a steel rod going down inside the device, then attached to an encoder wheel. It means the optical components can be inside the device. I'm kinda stuck with one thing though - how can I make electrical contact with the steel rod (and therefore the scratch wheel) if it's going to be rotating? Carbon brushes? Or just stick it through a bush and hope for the best? I'm obviously going to experiment with various things and post results, but if anyone has any thoughts on this matter I'd really appreciate them. I'm very much out of my area of expertise here.
×
×
  • Create New...