Jump to content

sneakthief

Programmer
  • Posts

    374
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by sneakthief

  1. oops, i meant 452! must have typed that because i have a 4620 and 4520 sitting next to my pc right now ;)
  2. i'm using a 4520 for now. these are program constants so it's not in the ram. anyhow, all of my sequences are loading and the data shows up and is transmitting correctly :) i'll try out your code! thx for sharing it here :)
  3. no doubt - that's why i posted "newbie alert" and am looking for advice! first of all, other than not being able to use switch case 25-28, my sequencer now works perfectly :) i can try some various workaround in the meantime. re. mbseq - yes, TK's sequencer is amazing; however it can't handle long sequences (up to 256 measures) and has many unnecessary features and requirements for my specific needs. re. timing - my loaded sequences only start playing at the beginning of the next measure. after extensive testing, the timing is actually perfect and there's no delay incurred by those switch loops. re. bad case - ignore the seq48 typo. i was trying some different things out and accidentally left that in when i posted. it still crashes when it's sequentially ordered. as i said, even when there's nothing in the cases, it still crashes, eg case 24: break; re. changing the linker - i'm going to try that asap. (although i still had some weird data issues when using smaller multi-d arrays - hopefully it was just my crappy code ;) ) re. pointers - i'll try and wrap my head around these. i still haven't figured out how to use them here yet. thanks for the feedback 8)
  4. Because I couldn't find a better way to do this (newbie alert!), I'm using 50 switches to load one of 50 different arrays. However SDCC is giving gives these warnings when I compile: ------------------------------------------------------------------- MOVFF PREINC1, r0x31 pcoderegs.c:367: removing reg r0x31 because it is only used once MOVFF PREINC1, r0x32 pcoderegs.c:367: removing reg r0x32 because it is only used once ------------------------------------------------------------------- Now here comes the bad part: when I trigger case 25, it crashes - even when there's nothing in the case! And switch 27 and 28 simply corrupt my array. All others work. If I use less only 25 switches, I only get this SDCC warning: ------------------------------------------------------------------- MOVFF PREINC1, r0x00 pcoderegs.c:367: removing reg r0x00 because it is only used once ------------------------------------------------------------------- Aynhow, here's my crappy code that creates the error: ////////////////////////////////////////////////////////////////////////////////////////////// // This function loads a stored sequence into the current song // // _songload is the song number passed to this function // // mclock_ctr_loadseq is used as a buffer that holds the current song info // // sq01 - sq50 are constant arrays with 20 elements - they hold note sequences // //////////////////////////////////////////////////////////////////////////////////////////// void MCLOCK_LoadSeq(unsigned char _songload) { unsigned int i; switch(_songload) { case 0: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq01[i]; } break; case 1: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq02[i]; } break; case 2: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq03[i]; } break; case 3: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq04[i]; } break; case 4: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq05[i]; } break; case 5: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq06[i]; } break; case 6: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq07[i]; } break; case 7: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq08[i]; } break; case 8: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq09[i]; } break; case 9: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq10[i]; } break; case 10: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq11[i]; } break; case 11: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq12[i]; } break; case 12: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq13[i]; } break; case 13: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq14[i]; } break; case 14: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq15[i]; } break; case 15: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq16[i]; } break; case 16: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq17[i]; } break; case 17: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq18[i]; } break; case 18: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq19[i]; } break; case 19: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq20[i]; } break; case 20: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq21[i]; } break; case 21: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq22[i]; } break; case 22: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq23[i]; } break; case 23: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq24[i]; } break; case 24: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq25[i]; } break; case 25: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq26[i]; } break; case 26: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq49[i]; } break; case 27: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq50[i]; } break; case 28: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq29[i]; } break; case 29: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq30[i]; } break; case 30: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq31[i]; } break; case 31: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq32[i]; } break; case 32: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq33[i]; } break; case 33: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq34[i]; } break; case 34: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq35[i]; } break; case 35: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq36[i]; } break; case 36: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq37[i]; } break; case 37: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq38[i]; } break; case 38: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq39[i]; } break; case 39: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq40[i]; } break; case 40: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq41[i]; } break; case 41: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq42[i]; } break; case 42: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq43[i]; } break; case 43: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq44[i]; } break; case 44: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq45[i]; } break; case 45: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq46[i]; } break; case 46: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq47[i]; } break; case 47: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq48[i]; } break; case 48: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq49[i]; } break; case 49: for (i = 0; i < 20; i++) { mclock_ctr_loadseq[i] = sq50[i]; } break; } } now you might say, "why not have the switches load a function instead?" however, i think that would just generate extra code since i still have to choose between one of 50 arrays (see this thread http://www.midibox.org/forum/index.php?topic=8902.0)
  5. re. your array experiment - please tell me the results if you get a chance to do this! re. multidimensional arrays - these are equally frustrating because each array can only have 255 elements - because my arrays have 20 items, this means i can only have 10 dimensions per array before they break. so if i'm already breaking it up into groups of 10, why not make the retrieval algorithm easier and simply break it up into 50 separate arrays. i'm eventually going to use a bankstick to hold all my arrays, but for the moment this is working ok.
  6. i've read a dozen function pointer tutorials and i can't seem to figure out how to address a different array depending on the variable passed to the function. ...because i'm such a dumbass and don't know how to elegantly access them in C, i had to make a conditional statement (aka switch) with 50 separate cases. so when a song is loaded, it has to manually go through each case to see if it's the right song so it can load the appropriate array... instead of somehow passing a variable from a function to load the right array.
  7. First of all, I've carefully read through the "Multidimensional Array" thread. But I'm not sure if it applies to my situation.... I have to create a series of ~50 different one-dimensional arrays, each containing about 20 elements (instead of just a multidimensional array, due to the 255 array-element limit) Based on the code below, what's the best way to load the contents of one of these arrays (into current_array) by passing an argument (array_number) to a function (LoadArray)? const char array1[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] const char array2[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] ... const char array50[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] ////////////////////////////////////////////////////////////// // This function loads a sequence based on the // argument that's passed to it ////////////////////////////////////////////////////////////// void LoadArray(unsigned char array_number) { unsigned char i; for (i = 0; i < 20; i++) { current_array[i] = array1[i]; } } Or is there a totally different way of doing this? thanks!
  8. aha! i got your first C example to work :) here's what the problem was: when i did this it produced an error: incrementer *= -1; unsigned int value; however, when I changed the order it worked: unsigned int value; incrementer *= -1; thanks so much for your perseverence on this, stryd_one!!
  9. I tried out your ASM code: When I turn the encoder CCW, the value decreases - but nothing happens when I turn it CW.
  10. In my case, it makes perfect sense to design the user-interface first because the software can easily be modified to fit my workflow. Software Description: Over the last decade, I've written all sorts of material (over 100 different songs, some completely finished, some very raw) on my rm1x and rs7000's in pattern-mode. Pattern-mode consists of up to 16 sections, each having 16 tracks. This is the basic sequencing paradigm that i wanted to use. For my live performances, I need control over groups of tracks and not each individual track. Look at the following typical example on my rs7000: Track Instrument ----- ----------- 1 kick 2 snare 3 hihat 4 claps 5 rides 6 other percussion 7 vocal samples 8 9 bass 10 melody 1 11 melody 2 12 pad 13 sfx 1 14 sfx 2 15 sfx 3 16 Since it's more efficient to control instrument groups, I spent a month recording *all* of my studio synths and samplers and broke down songs into various 1-16 measure loops, so now the typical track looks like this: Track Instrument ----- ----------- 1 kick 2 all other drums 3 bass 4 melodies 1+2, pads 5 vocals 6 sfx 1-3 So, this gives me the ability to improvise with song structure, as well as being able mix & match parts of various songs in order to create a spontaneous live performance, albeit with bigger building blocks than your traditional midi sequencer. However since I also use my rs7000 live, I still have very fine control over midi notes and such with one half of my setup. The other huge benefit of all the sampling is that I don't have to bring as much gear when I perform, and yet Kontakt's scripting language is very powerful and allows me to retain the expressiveness over how the samples are played back. The most important aspect is being able to respond to the dancefloor, and this setup accomplishes that nicely. The hardest part is finding a balance between automation and ability to control.
  11. update - i'm thick in the middle of programming it... ugh ;) midi clock is sending, tempo & transport controls are working, buttons respond to section changes and pots transmit midi cc's. still have to finish implementing song loading, track mutes and reading sequences from arrays. wish me luck! uhhh, i think i'm going to have to drop the voltage to the blue led's or do some PWM tricks 8)
  12. First of all, thanks for taking the time to help me out with this :) I appreciate it! I gathered as much :) Ok - Re. C encoder reverse: incrementer *= -1; This creates a syntax error: "token -> unsigned" Re. ASM encoder reverse: IFCLR MIOS_PARAMETER2, 7, addlw 1 This line also creates a syntax error. Am I doing something wrong here? Although I'm a C newbie (but not to programming in general), I understand exactly what you're trying to do.
  13. No, unless I'm missing something, it doesn't look like that at all. Here's the whole section: ;; -------------------------------------------------------------------------- ;; This function is called by MIOS when an encoder has been moved ;; Input: ;; o Encoder number in WREG and MIOS_PARAMETER1 ;; o signed incrementer value in MIOS_PARAMETER2: ;; - is positive when encoder has been turned clockwise ;; - is negative when encoder has been turned counter clockwise ;; -------------------------------------------------------------------------- USER_ENC_NotifyChange extern _ENC_NotifyChange lfsr FSR0, STACK_HEAD ; initialize stack lfsr FSR2, STACK_HEAD movff MIOS_PARAMETER2, POSTDEC0 ;; encoder number still in WREG goto _ENC_NotifyChange So there's nothing that resembles "IFCLR MIOS_PARAMETER2, 7, addlw 1"
  14. oh sorry for not being more specific: that code was taken directly from the mios_wrapper.asm used in the C examples section. the code that TK posted doesn't seem to work at all with the Clockbox code - I get a Syntax Error
  15. Sorry to drag this topic from the deep & dark vaults, but how does one do this now that the code has changed to this: USER_ENC_NotifyChange extern _ENC_NotifyChange lfsr FSR0, STACK_HEAD ; initialize stack lfsr FSR2, STACK_HEAD movff MIOS_PARAMETER2, POSTDEC0 ;; encoder number still in WREG goto _ENC_NotifyChange
  16. ok time to finish the software: (the two 1/4" jacks are for switching patterns with footpedals)
  17. ahhh, those knobs! they're for my DIY-modular. those are RE-AN Softtouch knobs as seen on many Euro-Rack and Frac-Rack modulars. I bought them from http://www.Rapidonline.com for 0.08p each. This is the direct link: http://www.rapidonline.com/productinfo.aspx?kw=soft%20touch&tier1=Tools%2c+Fasteners+%26+Production+Equipment&tier2=Fasteners+%26+Fixings&tier3=Knobs&tier4=16mm+soft+touch+knob&moduleno=64710
  18. i decided the silver was too distracting so i'm going "the extra mile" and painting it black today. re. knobs - futurlec.com (i posted a link for all my parts at the beginning ;) re. colourful - you're the second person be pointing that out ::) honestly, when you're performing in a dark club, it really improves the user interface if you only have to quickly glance to see what find a button or knob. for example, i've got knobs permanently assigned to things like chorus, flanger, phaser, delay, lo-pass, hi-pass, bit crusher, etc... hence the very specific colour-coding. sorry to get a bit defensive, but i perform live for a living and this particular user-interface design is backed up by 10 years of experience 8)
  19. Update: Here's what's left to do: - install LED's - finsish panel wiring - finish software *heheh* I really wanted to paint the front panel black but I simply don't have time and I have 7 gigs coming up... plus it's really irritating to do a few coats of paints and a clear-coat and then suddenly some holes are too small for pots & buttons.
  20. you should use the ninth channel as a master channel! you could assign some of those pots to aux returns, master eq/fx, etc. of course, you probably need another AIN board, maybe even another CORE - but those don't cost that much considering how much work & money you've already put into your project. when you get a lemon, make lemonade :)
  21. Any PCB house will make them! That's the beauty of it, you just send the regular gerbers that specify the labels on the silkscreen and maybe some starter holes for the pots, switches & jacks.
  22. You could also get one of these 5.0v high-precision voltage regulators from Microchip: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010617 cheers, michel
  23. th0mas - i agree! that's exactly what i've been doing: i built a clockbox and customized it a couple of years ago - now comes the fun part. TK - i'll post some more "uCapps-enabled" live performances soon :)
  24. If I understand the faq correctly, it's possible that the EUSART bug will show up if I have 2 cores linked together, right? (with no other midi input)
  25. Oh I forgot to mention why I'm building this: I perform live electronic dance music for a living and want something lighter to replace my aging RM1x. I currently use a Yamaha RM1x to sequence Kontakt 2, which is loaded with 6gb of my home-made loops and samples. The pots control various effects and scripts in Kontakt. In the top right, you can see my tiny silver PC that weighs only 2kg. When I turn it on, it automatically loads Kontakt with all my samples - so I don't need a monitor, keyboard or mouse! (and that lil' red box is my little Midibox Clockbox that syncs up all my sequencers :) )
×
×
  • Create New...