 |
Muff's Modules & More cats and modular synths, but mostly cats
|
| View previous topic :: View next topic |
| Author |
RCD with longer divisions |
JP Super Deluxe Wiggler
Joined: 07 Jan 2010 Last Visit: 29 Jan 2013
   Posts: 1084 Location: NJ
|
Posted: Thu Mar 01, 2012 3:28 pm Post subject: |
 |
|
|
Oh I do like the utility function
| Code: |
inline void set_step(uint8_t step){
if (step<=5) {
ALLOFF(OUT_PORT2,OUT_MASK2);
OUT_PORT1 |= (OUT_MASK1) & ~(1<<step); //turn off all unmasked pins except the one we want to keep on
ON(OUT_PORT1,step); //make sure the one we want is on
} else if (step==6){
ALLOFF(OUT_PORT1,OUT_MASK1);
OFF(OUT_PORT2,6); //turn off #6 which is step==7
ON(OUT_PORT2,7); //make sure #7 is on (step==6)
} else if (step==7){
ALLOFF(OUT_PORT1,OUT_MASK1);
OFF(OUT_PORT2,7); //turn off #7 which is step==6
ON(OUT_PORT2,6); //make sure #6 is on (step==7)
}
}
|
Am i correct that LED's on is the same as gate/trigger out? The two are connected yes?
So if this is a super simple clock based iteration, could you maybe post a barebones example of something that might be clock triggered for start, but after that the progression is independent to the clock, so say for example the tracking gate sequencer that tracks 8 outs per clock, so clock in, out, 1, 2, 3, 4, 5, 6, 7, 8, clock in, etc. |
|
| Back to top |
|
 |
JP Super Deluxe Wiggler
Joined: 07 Jan 2010 Last Visit: 29 Jan 2013
   Posts: 1084 Location: NJ
|
Posted: Thu Mar 01, 2012 7:08 pm Post subject: |
 |
|
|
| 3rd RCD kit just arrived. Am I better, from a flexibility when tinkering standpoint, wiring it as an RCD or an SCM? |
|
| Back to top |
|
 |
ianross Ultra Wiggler
Joined: 15 Oct 2011 Last Visit: 18 Jun 2013
 Posts: 822 Location: Los Angeles
|
Posted: Fri Mar 02, 2012 2:46 am Post subject: |
 |
|
|
| I don't know what this thread is really about but i'm going to buy an RCD soon so if it can be boiled down to how it would affect creative RCD users do share : ) |
|
| Back to top |
|
 |
JP Super Deluxe Wiggler
Joined: 07 Jan 2010 Last Visit: 29 Jan 2013
   Posts: 1084 Location: NJ
| |
| Back to top |
|
 |
a scanner darkly a fuzzy beacon
Joined: 16 Nov 2011 Last Visit: 18 Jun 2013
 Posts: 809 Location: Vancouver • Seattle
|
Posted: Fri Mar 02, 2012 1:39 pm Post subject: |
 |
|
|
Have you tried any simulators yet? Found this one:
http://www.oshonsoft.com/avr.html
I'll be away from my computer this weekend though so won't be able to try it until next week. Getting my RCD and programmer next week too so I might just try it on RCD. _________________ music • dj mixes • eurorack video tutorials • bug |
|
| Back to top |
|
 |
JP Super Deluxe Wiggler
Joined: 07 Jan 2010 Last Visit: 29 Jan 2013
   Posts: 1084 Location: NJ
|
Posted: Fri Mar 02, 2012 3:22 pm Post subject: |
 |
|
|
I looked at a bunch of em/sim/ulators but they seemed more complicated than actually doing the C programming, so I gave up. I'm hoping to keep the learning curve as gentle as possible, so I can actually see results, rather than becoming angry at 3am.
Still waiting on my programmer, but I'm piecing together a few chunks of simple logic code to try out once it arrives.
I'm not even thinking about the expansion pins for now. Just focusing on the 3 ins, and the 8 outs.
I'd love to see some more utility functions like the one above and maybe a scaffold of code that people can just drop their logic and calculations into and without needing the complex embedded C stuff. |
|
| Back to top |
|
 |
4mspedals Wiggling with Experience
Joined: 21 Jul 2009 Last Visit: 18 Jun 2013
   Posts: 395 Location: Portland, OR
|
Posted: Fri Mar 02, 2012 3:56 pm Post subject: |
 |
|
|
| JP wrote: |
Oh I do like the utility function
| Code: |
inline void set_step(uint8_t step){
if (step<=5) {
ALLOFF(OUT_PORT2,OUT_MASK2);
OUT_PORT1 |= (OUT_MASK1) & ~(1<<step); //turn off all unmasked pins except the one we want to keep on
ON(OUT_PORT1,step); //make sure the one we want is on
} else if (step==6){
ALLOFF(OUT_PORT1,OUT_MASK1);
OFF(OUT_PORT2,6); //turn off #6 which is step==7
ON(OUT_PORT2,7); //make sure #7 is on (step==6)
} else if (step==7){
ALLOFF(OUT_PORT1,OUT_MASK1);
OFF(OUT_PORT2,7); //turn off #7 which is step==6
ON(OUT_PORT2,6); //make sure #6 is on (step==7)
}
}
|
Am i correct that LED's on is the same as gate/trigger out? The two are connected yes?
So if this is a super simple clock based iteration, could you maybe post a barebones example of something that might be clock triggered for start, but after that the progression is independent to the clock, so say for example the tracking gate sequencer that tracks 8 outs per clock, so clock in, out, 1, 2, 3, 4, 5, 6, 7, 8, clock in, etc. |
Yes, the LEDs are hardwired to the gate/trigger outputs, so it's the same thing.
So to do something like you're saying, It's going to need some sort of timer or maybe take another clock from the reset jack or something, or else how will it know how fast to increment the jacks?
I would use RESET as the "start" pulse and CLOCK_IN as the "timing" pulse. So make a new variable, call it "current_output". Set it to 0 initially (meaning it's not running and waiting for a clock pulse). Then when you get a RESET pulse, set it to 1, this starts the sequence. Then whenever it gets a CLOCK_IN pulse and current_output>0, it turns on the appropriate output and increments current_output. When current_output==8, it resets it to 0 (so the sequence will stop).
Something like this:
| Code: |
uint8_t current_output;
...
...
current_output=0;
while(1){ //main loop
if (RESET_SWITCH){ //(re-)start the sequence when we get a reset
if(reset2_up==0){
reset2_up=1;
current_output=1;
}
}
if (CLOCK_IN && (current_output>0)){ //only care about the CLOCK_IN if the sequence is running
clock_down=0;
if (!clock_up){
clock_up=1;
ON(CLOCK_LED_PORT,CLOCK_LED_pin);
//increment current_output
current_output++;
//Reset current_output to 0 after it passes 8 (this stops the seq)
if (current_output>8) current_output=0;
//Light up one jack depending on the value of current_output
set_step(current_output);
}
} else {
clock_up=0;
if (!clock_down){
clock_down=1;
OFF(CLOCK_LED_PORT, CLOCK_LED_pin);
}
}
}//main loop
|
Haven't tried it. Something like that should work... |
|
| Back to top |
|
 |
JP Super Deluxe Wiggler
Joined: 07 Jan 2010 Last Visit: 29 Jan 2013
   Posts: 1084 Location: NJ
|
Posted: Fri Mar 02, 2012 4:20 pm Post subject: |
 |
|
|
AVR programmer just arrived. This weekend could be fun.
I guess the part of the main loop I'm still in a fuzz about is the non clock triggered timing.
How to simplify the SCM (say remove the shuffle) how would a simple clock multiplier work. I'm assuming we get into tracking hz level timing? |
|
| Back to top |
|
 |
4mspedals Wiggling with Experience
Joined: 21 Jul 2009 Last Visit: 18 Jun 2013
   Posts: 395 Location: Portland, OR
|
Posted: Fri Mar 02, 2012 5:30 pm Post subject: |
 |
|
|
| JP wrote: | AVR programmer just arrived. This weekend could be fun.
|
Prepare to enter the "code zone"
| Quote: |
I guess the part of the main loop I'm still in a fuzz about is the non clock triggered timing.
How to simplify the SCM (say remove the shuffle) how would a simple clock multiplier work. I'm assuming we get into tracking hz level timing? |
It's all about the INTERNAL timer. See this section:
| Code: |
/*
Check to see if the clock input timer tmr[INTERNAL] has surpassed the period
If so,
*/
now=gettmr(INTERNAL);
if (now>=period){
got_internal_clock=1;
}
if (got_internal_clock || (clockin_irq_timestamp && CLOCK_IN)){
///process an incoming clock signal...
|
In the SCM, it's all about period, not frequency. The main (x1) period is defined by the variable "period".
What's happening in this code segment is the internal timer is always running in the background, and if it exceeds the period amount we set got_internal_clock to 1. Then the very next line it checks to see if we either set got_internal_clock or if we received a clock pulse on the input jack (clockin_irq_timestamp && CLOCK_IN). Either way, it treats them the same and fires the jacks, updates the period, and does all the jazz. So that's why it will run even if you don't have a clock being inputted. If you just commented out the got_internal_clock=1 line, it would work like the RCD and only respond when a clock is actually being fed in. |
|
| Back to top |
|
 |
phono1337 2SK30A-O
Joined: 29 Nov 2009 Last Visit: 18 Jun 2013
   Posts: 833 Location: temple of x0x
|
Posted: Sat Mar 03, 2012 8:35 am Post subject: |
 |
|
|
tagging this thread for when my avr arrives  _________________ Din Sync |
|
| Back to top |
|
 |
LoFi Junglist Wired for sound
Joined: 30 Jan 2011 Last Visit: 18 Jun 2013
  Posts: 1093 Location: Adelaide, Australia.
|
Posted: Sat Mar 03, 2012 8:47 am Post subject: |
 |
|
|
Don't hesitate to get that AVR ISP if your interested into getting into AVR's, I've been using them with AVR studio for years without hassle and recommend/buy them for mates when they mention an interest in micros.
If you have time to wait, the one's from eBay (china) take about two weeks to arrive, but only cost around $25 (just make sure its the little blue jiffy box versions like in that Mouser link, the others are shit, I've tried 4 different types over the years) . |
|
| Back to top |
|
 |
Drumdrumdrumdrum What she said
Joined: 26 Jul 2011 Last Visit: 25 May 2013
 Posts: 2882 Location: Tropical Australia
|
Posted: Sat Mar 03, 2012 1:17 pm Post subject: |
 |
|
|
| I'm really impressed! No really. I can't understand a thing but it is all very impressive. If you had asked me the original question I would have suggested halving your main clock/tempo and double time everything else, or just seq ITB to get the job done. Not sure how productive this kind of writing process is? Still, it is minds like yours that get better code into the gear we all buy, so thank you. Keep it up. As you where. |
|
| Back to top |
|
 |
JP Super Deluxe Wiggler
Joined: 07 Jan 2010 Last Visit: 29 Jan 2013
   Posts: 1084 Location: NJ
|
Posted: Fri Mar 16, 2012 7:43 am Post subject: |
 |
|
|
Building my second test bed RCD tonight.
Does anyone know if it's better off built as an RCD or an SCM for testing out new firmware ideas? For now I won't be using the expansion options, but it would be good to have those as an option in the future. |
|
| Back to top |
|
 |
HueMonContact VoltageCtrlR
Joined: 13 Aug 2010 Last Visit: 18 Jun 2013
  Posts: 1603 Location: Los Angeles / Arizona
| |
| Back to top |
|
 |
4mspedals Wiggling with Experience
Joined: 21 Jul 2009 Last Visit: 18 Jun 2013
   Posts: 395 Location: Portland, OR
|
Posted: Fri Mar 16, 2012 12:27 pm Post subject: |
 |
|
|
| JP wrote: | Building my second test bed RCD tonight.
Does anyone know if it's better off built as an RCD or an SCM for testing out new firmware ideas? For now I won't be using the expansion options, but it would be good to have those as an option in the future. |
For a dev board, I would definitely put all the expansion pins on the PCB and not snip any off!
The only difference in the circuit is the normalization on the second CV input jack (Reset on the RCD, or Slip on the SCM). In the RCD it's shorted to GND, and in the SCM it's tied to a voltage divider made up of two 470k resistors (providing about 2.5V reference). So really, it doesn't matter which way you build it... |
|
| Back to top |
|
 |
4mspedals Wiggling with Experience
Joined: 21 Jul 2009 Last Visit: 18 Jun 2013
   Posts: 395 Location: Portland, OR
|
Posted: Tue Mar 20, 2012 10:46 pm Post subject: |
 |
|
|
Just a big FYI for anyone who's already watching the Clocker repository on github:
Under Doug's guidance, I re-organized the github. The new base link is:
https://github.com/4ms/
then there's separate repositories for each project:
https://github.com/4ms/RCD
https://github.com/4ms/SCM
https://github.com/4ms/TGS
https://github.com/4ms/taptempo-RCDBO
https://github.com/4ms/dinsync-SCM
The last two I'll need to provide info on the hardware (or doug could explain the Dinsync one...), as the clocker PCB is wired up differently. But not tonight, I've worked too late already...
I also tagged the old version of the RCD (v1.0.2) so that it's still available. Just click on the RCD repo, and then click on Tags.
I renamed the old Clocker repository so that it won't get used accidentally. In a little bit I'll delete it. |
|
| Back to top |
|
 |
mangobob Wiggling with Experience
Joined: 23 Jan 2011 Last Visit: 17 Jun 2013
  Posts: 261
|
Posted: Tue May 15, 2012 8:59 pm Post subject: |
 |
|
|
| Any more details on the taptempo-RCDBO and dinsync-SCM? I'd love to get my RCD clocking off dinsync. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|