Muff's Modules & More
cats and modular synths, but mostly cats

 Search for at Muff's Modules & MoreGoogle Muff's Modules & More Advanced Search

Author RCD with longer divisions
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Mon Feb 27, 2012 11:44 am    Post subject: RCD with longer divisions

I was wondering if there's a possibility that a variant of the RCD firmware/hex is floating around that might do even longer divisions.

Now I have an RCD and an SCM, I'd really like a super RCD that I could use for triggering x1, x4, x8, x12, x16, x20, x24, x28, x32 etc for triggering bar length progressions.

I do understand I could just clock the x4 out of my rcd into another rcd, but figured I'd ask if a specific version might exist.
50quidsoundboy
beneath the carpet tiles, the beach

Joined: 07 Nov 2011
Last Visit: 18 Jun 2013

Posts: 482
Location: London, UK

 Posted: Mon Feb 27, 2012 11:52 am    Post subject:

isn't this what the RCD breakout panel is for? goes down to x64 if i remember correctly. it's very cheap, you can even buy a kit (i haven't built mine yet...)
bsmith
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 19 Jun 2013

Posts: 2347
Location: Dallas

 Posted: Mon Feb 27, 2012 12:02 pm    Post subject:

If you have the avrisp then grab code from the 4ms site here.

 Quote: if (switchread==0) { t=7; d=adc>>5;} //LL: d=0..7, masked by t=0b00000111 gives on jack 1 DIV 1-8 else if (switchread==(1<>4)+8;} //LH: d=8..23, masked by t=0b00001111 gives: DIV 9-16|1-8 else if (switchread==(1<>3)+16;} //HL: d=16..47, masked by t=0b00011111 gives: DIV 17-32|1-16 else { t=63; d=(adc>>3)+32;} //HH: d=31..95, masked by t=0b00111111 gives: DIV 32-64|1-31

Those are the jumper settings - so the t= in the various ones is the top division for that jumper setting ( minus 1 - in the code generally look at the outs and divisions starting at '0'). You'll want to up that t= value to the top division you're wanting for whichever switch setting.

The various gate and jumper sections have parts that look like:
 Quote: if (GATEMODE_JUMPER){ if (o0==((((0+d)&t)/2)+1)){OFF(OUT_PORT1,0);} if (o1==((((1+d)&t)/2)+1)){OFF(OUT_PORT1,1);} if (o2==((((2+d)&t)/2)+1)){OFF(OUT_PORT1,2);} if (o3==((((3+d)&t)/2)+1)){OFF(OUT_PORT1,3);} if (o4==((((4+d)&t)/2)+1)){OFF(OUT_PORT1,4);} if (o5==((((5+d)&t)/2)+1)){OFF(OUT_PORT1,5);} if (o6==((((6+d)&t)/2)+1)){OFF(OUT_PORT2,7);} if (o7==((((7+d)&t)/2)+1)){OFF(OUT_PORT2,6);} } else { if (++o0>((0+d)&t)){ o0=0;} if (++o1>((1+d)&t)){ o1=0;} if (++o2>((2+d)&t)){ o2=0;} if (++o3>((3+d)&t)){ o3=0;} if (++o4>((4+d)&t)){ o4=0;} if (++o5>((5+d)&t)){ o5=0;} if (++o6>((6+d)&t)){ o6=0;} if (++o7>((7+d)&t)){ o7=0;}

So could maybe change the upbeat one to:
if (++o0>((0+d)&t)){ o0=0;}
if (++o1>((3+d)&t)){ o1=0;}
if (++o2>((7+d)&t)){ o2=0;}
if (++o3>((11+d)&t)){ o3=0;}
if (++o4>((15+d)&t)){ o4=0;}
if (++o5>((19+d)&t)){ o5=0;}
if (++o6>((23+d)&t)){ o6=0;}
if (++o7>((27+d)&t)){ o7=0;}

or something like that - poke with it.

_________________
Super Deluxe Wiggler

Joined: 20 Jan 2011
Last Visit: 19 Jun 2013

Posts: 2446
Location: tacoma wa

 Posted: Mon Feb 27, 2012 12:04 pm    Post subject:

o_0 he is a wizard with the RCD!!
_________________
Tacoma Noise Rodeo

much neglected blog
Modular Cases: .Monster baser. and .mostly empty 6u.
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Mon Feb 27, 2012 12:10 pm    Post subject:

BURN HIM!~!

JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Mon Feb 27, 2012 12:11 pm    Post subject:

 bsmith wrote: If you have the avrisp then grab code from the 4ms site... snipped ...or something like that - poke with it.

I need to buy a burner and look into this some more.

Although my worry is I'll get carried away and before I know it I'll have 12u full of RCD's all going crazy.
bsmith
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 19 Jun 2013

Posts: 2347
Location: Dallas

 Posted: Mon Feb 27, 2012 12:19 pm    Post subject:

JP wrote:
 bsmith wrote: If you have the avrisp then grab code from the 4ms site... snipped ...or something like that - poke with it.

I need to buy a burner and look into this some more.

Although my worry is I'll get carried away and before I know it I'll have 12u full of RCD's all going crazy.

http://www.mouser.com/ProductDetail/Atmel/ATAVRISP2/?qs=2mdvTlUeTfBRoy csKqwYpg%3d%3d

Kind of thinking about a second rcd myself.

_________________
Rozzer
To the pub!

Joined: 25 Oct 2009
Last Visit: 19 Jun 2013

Posts: 609
Location: Manchester, UK

 Posted: Mon Feb 27, 2012 1:20 pm    Post subject:

Wow, I'm very interested in this. I've often thought it would be cool to have the RCD rotating non-sequential divisions.

bmsith - have you actually had this working with your code tweak? Has anyone?
Super Deluxe Wiggler

Joined: 20 Jan 2011
Last Visit: 19 Jun 2013

Posts: 2446
Location: tacoma wa

 Posted: Mon Feb 27, 2012 1:22 pm    Post subject:

 Rozzer wrote: Wow, I'm very interested in this. I've often thought it would be cool to have the RCD rotating non-sequential divisions. bmsith - have you actually had this working with your code tweak? Has anyone?

when i said bsmith was a wizard he is.

you should hang out on IRC and talk to him about it.

_________________
Tacoma Noise Rodeo

much neglected blog
Modular Cases: .Monster baser. and .mostly empty 6u.
bsmith
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 19 Jun 2013

Posts: 2347
Location: Dallas

 Posted: Mon Feb 27, 2012 1:29 pm    Post subject:

 Rozzer wrote: Wow, I'm very interested in this. I've often thought it would be cool to have the RCD rotating non-sequential divisions. bmsith - have you actually had this working with your code tweak? Has anyone?

Yeah, I've changed what the jack divisions put out, as well as some other things like changing some jacks to rotate in increments of 2 while others do 1 as shipped...
there may or may not be some much cooler stuff on the rcd being worked on by bigger brains than myself we can all look forward to.

_________________
Rozzer
To the pub!

Joined: 25 Oct 2009
Last Visit: 19 Jun 2013

Posts: 609
Location: Manchester, UK

 Posted: Mon Feb 27, 2012 1:41 pm    Post subject:

That's fantastic news, guess I'll be buying a burner this week then
machetemirage
Wiggling with Experience

Joined: 05 Jan 2011
Last Visit: 19 Jun 2013

Posts: 255
Location: Melbourne, FL

 Posted: Mon Feb 27, 2012 1:54 pm    Post subject:

Get a second RCD, and send the slowest clock from the first to the second....
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Mon Feb 27, 2012 1:58 pm    Post subject:

AVR programmer ordered, 3rd RCD/SCm kit ordered. :-) I'm keeping this third one for bonkers.
Rozzer
To the pub!

Joined: 25 Oct 2009
Last Visit: 19 Jun 2013

Posts: 609
Location: Manchester, UK

 Posted: Tue Feb 28, 2012 4:19 am    Post subject:

 machetemirage wrote: Get a second RCD, and send the slowest clock from the first to the second....

This wouldn't give the same results as JP is suggesting at all. A second RCD would still rock of course
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Tue Feb 28, 2012 9:15 am    Post subject:

I can see the RCD project files:

http://4mspedals.com/clocker/code/rcd_avrgcc_project.zip

But does anyone know if the other hex files are available as project bundles? I'd love to see how the sequential switch and the SCM are coded, to get some foundation for how to approach some of my ideas.

I was also thinking of putting some of the project files up on github, so they can be versioned, and forked and bug fixed communially.

Hoping Dann, might wander in here and say everything would be cool with that
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Tue Feb 28, 2012 11:27 am    Post subject:

Yes! I haven't used github, but it looks allright. If you want to set up a clocker repository, I'll put the various versions I have around on it. It makes a lot of sense to use a revisioning system because there are several forks already, and I'm working on some new ones too...

Here's the SCM project files:

http://www.4mspedals.com/scm.php#firmware

I've got the Tracking Gate Sequencer code as well, I can throw that up too.

And I know I need to comment better Please feel free to ask me questions/explanations of the code..
Drumdrumdrumdrum
What she said

Joined: 26 Jul 2011
Last Visit: 25 May 2013

Posts: 2882
Location: Tropical Australia

 Posted: Tue Feb 28, 2012 11:35 am    Post subject:

What fork!? I thought it was a spoon?

The only thing that makes any sense to me in this thread is "a second RCD"

_________________
"Modular synths can take your ego out of the equation – which, in music, is a blessing" - Jeremy Greenspan

4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Tue Feb 28, 2012 2:03 pm    Post subject:

Heh... OK with thedug's help I dove into github... started a repository here:

https://github.com/4ms/Clocker

Maybe we should move this discussion to the DIY forum?
a scanner darkly
a fuzzy beacon

Joined: 16 Nov 2011
Last Visit: 19 Jun 2013

Posts: 812
Location: Vancouver • Seattle

 Posted: Tue Feb 28, 2012 2:33 pm    Post subject:

This is awesome. Just bought an RCD because of this thread. I want to try programming something more radical with it though

I had a quick look at the code (and there is actually a lot of comments - very helpful ) so if I understand correctly RCD (or SCM) can be seen as 2 CV inputs going through ADC, and same ADC converts additional CV inputs in the extensions?

_________________
musicdj mixeseurorack video tutorialsbug
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Tue Feb 28, 2012 2:52 pm    Post subject:

 4mspedals wrote: Heh... OK with thedug's help I dove into github... started a repository here: https://github.com/4ms/Clocker Maybe we should move this discussion to the DIY forum?

Awesome ! This is going to be an adventure.

As I suspected SCM is much more complex than the RCD by a factor of pw0=8400,pw1=4200,pw2=2800,pw3=2200,pw4=1680,pw5=1400,pw7=1050;
bsmith
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 19 Jun 2013

Posts: 2347
Location: Dallas

 Posted: Tue Feb 28, 2012 2:59 pm    Post subject:

JP wrote:
 4mspedals wrote: Heh... OK with thedug's help I dove into github... started a repository here: https://github.com/4ms/Clocker Maybe we should move this discussion to the DIY forum?

Awesome ! This is going to be an adventure.

As I suspected SCM is much more complex than the RCD by a factor of pw0=8400,pw1=4200,pw2=2800,pw3=2200,pw4=1680,pw5=1400,pw7=1050;

That bit is one of the simpler easier to tinker with things in the scm code - the initial pulse width on the various outs.....

_________________
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Wed Feb 29, 2012 12:26 pm    Post subject:

 a fuzzy beacon wrote: This is awesome. Just bought an RCD because of this thread. I want to try programming something more radical with it though I had a quick look at the code (and there is actually a lot of comments - very helpful ) so if I understand correctly RCD (or SCM) can be seen as 2 CV inputs going through ADC, and same ADC converts additional CV inputs in the extensions?

Yeah, there's two CV inputs and a clock input. On the RCD the breakout pins are switches (digital inputs) and on the SCM they're mostly analog inputs (ADC). The ADC is set to read one input at a time by setting the ADMUX register
a scanner darkly
a fuzzy beacon

Joined: 16 Nov 2011
Last Visit: 19 Jun 2013

Posts: 812
Location: Vancouver • Seattle

 Posted: Wed Feb 29, 2012 1:06 pm    Post subject:

 4mspedals wrote: Yeah, there's two CV inputs and a clock input. On the RCD the breakout pins are switches (digital inputs) and on the SCM they're mostly analog inputs (ADC). The ADC is set to read one input at a time by setting the ADMUX register

RCD and SCM both use ATmega168 chip, right? So it has 8 channels that can be selected by ADMUX plus I saw this in the doc: "The analog input channel is selected by writing to the MUX bits in ADMUX. Any of the ADC input pins, as well as GND and a fixed bandgap voltage reference, can be selected as single ended inputs to the ADC" - that makes 10 inputs in total if I understood it correctly.

3 inputs are used for clock / rotate / reset on RCD and for clock / rotate / slip on SCM, that leaves 7 for extensions - what confused me was that SCM breakout got 8 inputs, but 2 of them are duplicates of SCM (rotate and slip).

_________________
musicdj mixeseurorack video tutorialsbug
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Wed Feb 29, 2012 1:20 pm    Post subject:

Clock IN goes to PD2 which is a digital pin (not controlled by the ADC).

The mega168 has 6 ADC channels on pins PC0-PC5. In the SCM they are
PC5=Shuffle
PC4=Resync
PC3=Skip
PC2=PW
PC1=SLIP
PC0=ROTATE

On the RCD there's only one analog channel, just PC0=ROTATE. The rest are used digitally (on or off).
PC1=Reset and PC2-5 are the breakout switches.

Additionally, PD5 and PD4 go to the breakout header for "Fast x4" and MUTE on the SCM, and more breakout switches on the RCD.
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Wed Feb 29, 2012 1:45 pm    Post subject:

really wishing there was some way to test the code before burning it to the chip and testing. is there such a thing as an atmel emulator? or someway to run the code and test it by passing it fake triggers and seeing a log out for the triggers sent?
a scanner darkly
a fuzzy beacon

Joined: 16 Nov 2011
Last Visit: 19 Jun 2013

Posts: 812
Location: Vancouver • Seattle

 Posted: Wed Feb 29, 2012 1:46 pm    Post subject:

Thank you for detailed explanation - makes it easier to read the code as well! And sorry if that's too many questions but just want to make sure I understand correctly how it works...

Would it be correct to say that essentially breakouts provide access to PC0-PC5 (which can be treated as either analog or on/off values), so technically I could upload SCM code to RCD and use SCM breakout with it? Or is there a difference in how the breakout connector is wired? The reason I'm asking - I got RCD on the way and now thinking about getting SCM breakout as well as it will give me 2 switches and 6 inputs (5 of them attenuated) to play with.

_________________
musicdj mixeseurorack video tutorialsbug
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Wed Feb 29, 2012 1:55 pm    Post subject:

 JP wrote: really wishing there was some way to test the code before burning it to the chip and testing. is there such a thing as an atmel emulator? or someway to run the code and test it by passing it fake triggers and seeing a log out for the triggers sent?

There is a simulator, but I never saw the point when I can just do it in real-time on my bench. You can burn and re-burn I think 100,000 times per chip! So no harm done in trying out a few dozen/hundred ideas in a day
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Wed Feb 29, 2012 1:59 pm    Post subject:

 a fuzzy beacon wrote: Thank you for detailed explanation - makes it easier to read the code as well! And sorry if that's too many questions but just want to make sure I understand correctly how it works... Would it be correct to say that essentially breakouts provide access to PC0-PC5 (which can be treated as either analog or on/off values), so technically I could upload SCM code to RCD and use SCM breakout with it? Or is there a difference in how the breakout connector is wired? The reason I'm asking - I got RCD on the way and now thinking about getting SCM breakout as well as it will give me 2 switches and 6 inputs (5 of them attenuated) to play with.

Essentially, yes, but the breakout header also has pins for +12V, GND, and PD4 and PD5 as I described above. Also one pin is a reference voltage for the switch of the Slip or Reset jack. In the SCM it's set at 2.5V (50% slippage), and in the RCD it's set at 0V

We snip the unused header pins off the breakout header for the RCD, so you'll have to solder those back to convert RCD->SCM. Also we jumpered/omitted the reference voltage resistors (470k's). Check out the RCD kit build guide manual, it details the differences between the two with photos:
http://www.4mspedals.com/clocker/kit/scmrcd_build_guide.pdf

(edit: corrected it to PD4 and PD5)
Monobass
thonk.co.uk

Joined: 29 May 2009
Last Visit: 19 Jun 2013

Posts: 6629
Location: Brighton, UK

 Posted: Wed Feb 29, 2012 4:57 pm    Post subject:

_________________
Thonk - Modular Synth DIY

258J Euro kit - Manhattan Analog Kits- 4ms Kits - Clarke68 Panels - Expert Sleepers Glow Cables - Banana Jacks
bsmith
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 19 Jun 2013

Posts: 2347
Location: Dallas

 Posted: Wed Feb 29, 2012 5:19 pm    Post subject:

4mspedals wrote:
 JP wrote: really wishing there was some way to test the code before burning it to the chip and testing. is there such a thing as an atmel emulator? or someway to run the code and test it by passing it fake triggers and seeing a log out for the triggers sent?

There is a simulator, but I never saw the point when I can just do it in real-time on my bench. You can burn and re-burn I think 100,000 times per chip! So no harm done in trying out a few dozen/hundred ideas in a day

When I'm horsing around I don't even stop the clock going into it when sending changes. It kind of spazzes and goes hugghguhguugug for a sec then carries on with the changes when it's done after several seconds.

_________________
a scanner darkly
a fuzzy beacon

Joined: 16 Nov 2011
Last Visit: 19 Jun 2013

Posts: 812
Location: Vancouver • Seattle

 Posted: Wed Feb 29, 2012 5:24 pm    Post subject:

 4mspedals wrote: Essentially, yes, but the breakout header also has pins for +12V, GND, and PD4 and PD5 as I described above. Also one pin is a reference voltage for the switch of the Slip or Reset jack. In the SCM it's set at 2.5V (50% slippage), and in the RCD it's set at 0V We snip the unused header pins off the breakout header for the RCD, so you'll have to solder those back to convert RCD->SCM. Also we jumpered/omitted the reference voltage resistors (470k's). Check out the RCD kit build guide manual, it details the differences between the two with photos: http://www.4mspedals.com/clocker/kit/scmrcd_build_guide.pdf (edit: corrected it to PD4 and PD5)

Ahh ok. Will probably get SCM and breakout as well at some point but want to experiment with programming RCD first. Want to try producing some delayed gates with it first (so like 8 tap gate delay thingy) which should be fairly straightforward. Even simply using it as an ADC converter should be interesting, running an LFO into one of the inputs and using gates as 8 bit binary representation of CV value, and then try and trigger TipTop drums with it.

_________________
musicdj mixeseurorack video tutorialsbug
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Wed Feb 29, 2012 5:45 pm    Post subject:

 bsmith wrote: When I'm horsing around I don't even stop the clock going into it when sending changes. It kind of spazzes and goes hugghguhguugug for a sec then carries on with the changes when it's done after several seconds.

You have it plugged into the synth whilst programming it? Crazy talk.
bsmith
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 19 Jun 2013

Posts: 2347
Location: Dallas

 Posted: Wed Feb 29, 2012 5:47 pm    Post subject:

it needs to be powered up anyway....
_________________
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Wed Feb 29, 2012 5:47 pm    Post subject:

JP wrote:
 bsmith wrote: When I'm horsing around I don't even stop the clock going into it when sending changes. It kind of spazzes and goes hugghguhguugug for a sec then carries on with the changes when it's done after several seconds.

You have it plugged into the synth whilst programming it? Crazy talk.

Yeah I do the same... it make a delightful sound while programming
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Wed Feb 29, 2012 5:50 pm    Post subject:

 a fuzzy beacon wrote: Want to try producing some delayed gates with it first (so like 8 tap gate delay thingy) which should be fairly straightforward.

This is probably not what you mean, but this was what sprung into my head. So I'm adding it the the general brain storm pool of "crazy rcd ideas".

Gravity based trigger outs.

So trigger in, causes 8 outs (hell for starters lets just do trigger in causes out 1 to fire.

The out timing is based on those gravity calculations.

bang.......bang.....bang...bang..bang.bangbangbang

Once you have 1 out, it should be easy to make it all the outs fire, then tweak the math at each out so that gravity goes from moon to sun. That way you'd have 8 in sync starting points, and tailing off trigger repeats.

Clock in again, restarts the process.
a scanner darkly
a fuzzy beacon

Joined: 16 Nov 2011
Last Visit: 19 Jun 2013

Posts: 812
Location: Vancouver • Seattle

 Posted: Wed Feb 29, 2012 6:02 pm    Post subject:

Yeah that's exactly where I'm going with that one (and yes, just having a fixed delay at first or just a copy of clock in to out1 would be a great start )

I'm thinking, start with 8 triggers delayed by some arbitrary constant value first. Then use one of the CV inputs to control delay offset for each consecutive delay out, so at -5V each delay is twice as short as the previous one and at +5V it's twice as long. So then you vary the gravity effect with CV to be anything in between. Now imagine applying LFO to it

_________________
musicdj mixeseurorack video tutorialsbug
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Wed Feb 29, 2012 6:13 pm    Post subject:

See this is why RCD is my new most favorite module EVER!

It's seems so simple, yet the possible output could be amazing.
mangobob
Wiggling with Experience

Joined: 23 Jan 2011
Last Visit: 19 Jun 2013

Posts: 261

 Posted: Wed Feb 29, 2012 8:31 pm    Post subject:

Here are some ideas I had for the RCD unused jumpers.. there are 2 free pins right?

Boot the module in Tracking Gate Sequencer (A-161 style) mode.. like another extra hidden module. I suppose you could also buy an extra unit or do a chip swap but this would be convenient.

Disable/enable internal divide by 6 to easily get your RCD synced to 24 ppqn clock sources (ie unrotated out1 = /6, out2 = /12, out3 = /18 etc). Breakout a dinsync cable to the Clock In and Reset jacks to sync up x0x boxes and have musical divisions. Seems like it would work in theory although the clock signal and RCD would still be running if you hit stop but should reset/sync upon starts?
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Wed Feb 29, 2012 11:58 pm    Post subject:

I love coding in a language I have zero experience.

Now I'm assuming the simple stuff should be well simple, after all C is supposed to be foundational.

So excusing my overly verbose and lazy code would something like this "work" if for my hello world, I just want a sequential step for each clock in?

 Code: while(1){       if (CLOCK_IN){          clock_down=0;          if (!clock_up){             clock_up=1;//rising edge only                               ON(CLOCK_LED_PORT,CLOCK_LED_pin);                 if (i == 0) ON(OUT_PORT1, 0);                 if (i == 1) ON(OUT_PORT1, 1);                 if (i == 2) ON(OUT_PORT1, 2);                 if (i == 3) ON(OUT_PORT1, 3);                 if (i == 4) ON(OUT_PORT1, 4);                 if (i == 5) ON(OUT_PORT1, 5);                 if (i == 6) ON(OUT_PORT2, 7);                 if (i == 7){                     ON(OUT_PORT2, 6);                     //reset back to the beginning                     i = 0;                 }else{                     i++;                 }          }       }else{          clock_up=0;          if (!clock_down){             clock_down=1;//rising edge only                OFF(CLOCK_LED_PORT,CLOCK_LED_pin);                 ALLOFF(OUT_PORT1,OUT_MASK1);                 ALLOFF(OUT_PORT2,OUT_MASK2);          }       }    }   //endless loop

I was particularly intrigued by the port numbering and reference, 5 port 1's then 2 port 2's with a 7 and a 6?

programmer should arrive soon, then I can just test this.
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Thu Mar 01, 2012 12:34 pm    Post subject:

 JP wrote: I was particularly intrigued by the port numbering and reference, 5 port 1's then 2 port 2's with a 7 and a 6? programmer should arrive soon, then I can just test this.

Yes, it seems out of order, but that's how the PCB is wired. You have it correct: output jack /7 is ON(OUT_PORT2,7) and jack /8 is ON(OUT_PORT2,6). Then jacks /1 through /6 are ON(OUT_PORT1,0 to 5)

Looks like your code should work... on the rising edge it'll turn on the IN LED and also turn on one of the jacks (based on the value of i). Make i is initialized to 0 before the main loop. Then on the falling edge it'll turn everything off. So you'll have sequential trigger outputs.

PS I just added the Tracking Gate Sequencer code to the github:
https://github.com/4ms/Clocker/blob/master/TGS/clocker.c
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:

 4mspedals wrote: PS I just added the Tracking Gate Sequencer code to the github: https://github.com/4ms/Clocker/blob/master/TGS/clocker.c

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<

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.
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?
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 : )
JP
Super Deluxe Wiggler

Joined: 07 Jan 2010
Last Visit: 29 Jan 2013

Posts: 1084
Location: NJ

 Posted: Fri Mar 02, 2012 10:43 am    Post subject:

I started a suggestion thread over here http://www.muffwiggler.com/forum/viewtopic.php?t=54221

Figured keep this one for technical discussion
a scanner darkly
a fuzzy beacon

Joined: 16 Nov 2011
Last Visit: 19 Jun 2013

Posts: 812
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.

_________________
musicdj mixeseurorack video tutorialsbug
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.
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 Jun 2013

Posts: 395
Location: Portland, OR

 Posted: Fri Mar 02, 2012 3:56 pm    Post subject:

JP wrote:
 4mspedals wrote: PS I just added the Tracking Gate Sequencer code to the github: https://github.com/4ms/Clocker/blob/master/TGS/clocker.c

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<

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...
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?
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 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.
phono1337
2SK30A-O

Joined: 29 Nov 2009
Last Visit: 19 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
LoFi Junglist
Wired for sound

Joined: 30 Jan 2011
Last Visit: 19 Jun 2013

Posts: 1094

 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) .
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.
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.
HueMonContact
VoltageCtrlR

Joined: 13 Aug 2010
Last Visit: 19 Jun 2013

Posts: 1603
Location: Los Angeles / Arizona

 Posted: Fri Mar 16, 2012 12:07 pm    Post subject:

I already have an RCD but I'm going to buy a diy version and breakout and programmer so I can join in on all the fun!
_________________
Sound:
http://soundcloud.com/voltagectrlr
http://voltagectrlr.bandcamp.com
Game of Life Label Release: Inner Siddhi Portal
http://gameoflife.bandcamp.com/album/voltagectrlr-inner-siddhi-portal
++++++++++++++++++++++++++++++
Blog:
http://shirovoltagectrlr.tumblr.com/
http://groundloup.wordpress.com/
++++++++++++++++++++++++++++++
Video:
http://vimeo.com/voltagectrlr
______________________________________
HueMonContact...
Hue=Color, Mon=Man/Monster, Contact=Touch.
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 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...
4mspedals
Wiggling with Experience

Joined: 21 Jul 2009
Last Visit: 19 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.
mangobob
Wiggling with Experience

Joined: 23 Jan 2011
Last Visit: 19 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.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 5 Hours Page 1 of 3

 Jump to: Select a forum Forum index================ Site Stuff----------------Announcements - Please read!Forum + Wiki Discussion & Requests Modular Synths----------------Modular Synth General Discussion5U Format ModulesBuchla, EMS & SergeEurorack ModulesFractional Rack ModulesPlay Out! Performance Modulars Other Music Gear----------------General GearGuitars, Basses, Amps & FXMusic SoftwareMusic Tech DIYVideo Synthesis Music----------------Artist DiscussionProduction TechniquesSynth NoiseYour Tunes HereArtist Challenge 2010! General----------------Off-TopicMembers OnlyGatherings, Events & Meets The Market - Don't be a Douche----------------For Sale/TradeWant To Buy Official Discussion Forums - Proudly Hosted at Muff's!----------------ADDAC SystemAlyseum Amazing MachinesAMSynthsAniModuleBugBrand DevicesCiat-LonbardeDAEDSoundEpinastyExpert SleepersFlight of HarmonyFuture Sound Systemshexinverter.net ElectronicsI Dream Of WiresKOMA ElektronikMalekko Heavy IndustryMattson Mini ModularMetasonixMonorocketOakley Sound SystemsRackPlannerRoss Lamond DesignsSNAZZY FXsoundmachinesSTG SoundlabsSynthetic Sound LabsThe HarvestmanTotalmusikTouellSkouarn Trouby Modular VoltaWiardZerosum Inertia
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