MUFF WIGGLER
you'll find what you're looking for, life's like that
 
 FAQ & Terms Of UseFAQ & Terms Of Use   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Information
Please join us at NAMM! MW will be hosting a booth and we would like to invite all manufacturers small and large to join us. We are delighted to support this scene and help provide booth space for anyone who wants to show off their gear and partake in the company of the best group of folks on earth. Please email [email protected] to discuss details. Hope to see you there!



MW Radio

Search for at
MUFF WIGGLER Advanced Search
RCD with longer divisions
 
 
Post new topic   Reply to topic    MUFF WIGGLER Forum Index -> Eurorack Modules
View previous topic :: View next topic  
Author RCD with longer divisions
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Mon Feb 27, 2012 11:44 am    Post subject: RCD with longer divisions Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
50quidsoundboy
beneath the carpet tiles, the beach


Joined: 07 Nov 2011
Last Visit: 17 Nov 2014

Posts: 579
Location: Lincolnshire, UK

PostPosted: Mon Feb 27, 2012 11:52 am    Post subject: Reply with quote Add User to Ignore List

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...)
Back to top
View user's profile Send private message
bsmith
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 26 Nov 2014

Posts: 2620
Location: Dallas

PostPosted: Mon Feb 27, 2012 12:02 pm    Post subject: Reply with quote Add User to Ignore List

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<<ROTATE_JUMPER2)) {
t=15;
d=(adc>>4)+8;} //LH: d=8..23, masked by t=0b00001111 gives: DIV 9-16|1-8
else if (switchread==(1<<ROTATE_JUMPER1)) {
t=31;
d=(adc>>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.

_________________
Youtube Stuff | Soundcloud
Back to top
View user's profile Send private message
infradead
Super Deluxe Wiggler


Joined: 20 Jan 2011
Last Visit: 25 Nov 2014

Posts: 3677
Location: tacoma wa

PostPosted: Mon Feb 27, 2012 12:04 pm    Post subject: Reply with quote Add User to Ignore List

o_0 he is a wizard with the RCD!!
_________________
forget everything you know about sound, then turn the synth on. You can thank me later - slow_riot

cases: doepfer 6u and monster base

Tacoma Noise Rodeo and much neglected blog
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Mon Feb 27, 2012 12:10 pm    Post subject: Reply with quote Add User to Ignore List

infradead wrote:
o_0 he is a wizard with the RCD!!


BURN HIM!~!

Dead Banana
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Mon Feb 27, 2012 12:11 pm    Post subject: Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
bsmith
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 26 Nov 2014

Posts: 2620
Location: Dallas

PostPosted: Mon Feb 27, 2012 12:19 pm    Post subject: Reply with quote Add User to Ignore List

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.

_________________
Youtube Stuff | Soundcloud
Back to top
View user's profile Send private message
Rozzer
To the pub!


Joined: 25 Oct 2009
Last Visit: 24 Nov 2014

Posts: 647
Location: Manchester, UK

PostPosted: Mon Feb 27, 2012 1:20 pm    Post subject: Reply with quote Add User to Ignore List

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?

_________________
Boxed Ear - Rare synth and drum machines sampled lovingly
Music
Blog
Twitter
thumbs up
Back to top
View user's profile Send private message
infradead
Super Deluxe Wiggler


Joined: 20 Jan 2011
Last Visit: 25 Nov 2014

Posts: 3677
Location: tacoma wa

PostPosted: Mon Feb 27, 2012 1:22 pm    Post subject: Reply with quote Add User to Ignore List

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. wink

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

_________________
forget everything you know about sound, then turn the synth on. You can thank me later - slow_riot

cases: doepfer 6u and monster base

Tacoma Noise Rodeo and much neglected blog
Back to top
View user's profile Send private message
bsmith
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 26 Nov 2014

Posts: 2620
Location: Dallas

PostPosted: Mon Feb 27, 2012 1:29 pm    Post subject: Reply with quote Add User to Ignore List

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.
Ninja

_________________
Youtube Stuff | Soundcloud
Back to top
View user's profile Send private message
Rozzer
To the pub!


Joined: 25 Oct 2009
Last Visit: 24 Nov 2014

Posts: 647
Location: Manchester, UK

PostPosted: Mon Feb 27, 2012 1:41 pm    Post subject: Reply with quote Add User to Ignore List

That's fantastic news, guess I'll be buying a burner this week then thumbs up
_________________
Boxed Ear - Rare synth and drum machines sampled lovingly
Music
Blog
Twitter
thumbs up
Back to top
View user's profile Send private message
machetemirage
Wiggling with Experience


Joined: 05 Jan 2011
Last Visit: 25 Nov 2014

Posts: 285
Location: Melbourne, FL

PostPosted: Mon Feb 27, 2012 1:54 pm    Post subject: Reply with quote Add User to Ignore List

Get a second RCD, and send the slowest clock from the first to the second.... hmmm.....
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Mon Feb 27, 2012 1:58 pm    Post subject: Reply with quote Add User to Ignore List

AVR programmer ordered, 3rd RCD/SCm kit ordered. :-) I'm keeping this third one for bonkers.
Back to top
View user's profile Send private message
Rozzer
To the pub!


Joined: 25 Oct 2009
Last Visit: 24 Nov 2014

Posts: 647
Location: Manchester, UK

PostPosted: Tue Feb 28, 2012 4:19 am    Post subject: Reply with quote Add User to Ignore List

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


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

_________________
Boxed Ear - Rare synth and drum machines sampled lovingly
Music
Blog
Twitter
thumbs up
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Tue Feb 28, 2012 9:15 am    Post subject: Reply with quote Add User to Ignore List

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 smile
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Tue Feb 28, 2012 11:27 am    Post subject: Reply with quote Add User to Ignore List

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 (hides) Please feel free to ask me questions/explanations of the code..
Back to top
View user's profile Send private message
Drumdrumdrumdrum
What she said


Joined: 26 Jul 2011
Last Visit: 06 Oct 2014

Posts: 2886
Location: Tropical Australia

PostPosted: Tue Feb 28, 2012 11:35 am    Post subject: Reply with quote Add User to Ignore List

What fork!? I thought it was a spoon? seriously, i just don't get it

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

_________________
"There are two means of refuge from the miseries of life: music and cats."
- Author, Albert Schweitzer.

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


http://www.cdbaby.com/cd/glennkingsleymortimer
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Tue Feb 28, 2012 2:03 pm    Post subject: Reply with quote Add User to Ignore List

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?
Back to top
View user's profile Send private message
a scanner darkly
Guest






PostPosted: Tue Feb 28, 2012 2:33 pm    Post subject: Reply with quote

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

I had a quick look at the code (and there is actually a lot of comments - very helpful thumbs up ) 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?
Back to top
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Tue Feb 28, 2012 2:52 pm    Post subject: Reply with quote Add User to Ignore List

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;
Back to top
View user's profile Send private message
bsmith
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 26 Nov 2014

Posts: 2620
Location: Dallas

PostPosted: Tue Feb 28, 2012 2:59 pm    Post subject: Reply with quote Add User to Ignore List

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.....

_________________
Youtube Stuff | Soundcloud
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Wed Feb 29, 2012 12:26 pm    Post subject: Reply with quote Add User to Ignore List

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 nanners

I had a quick look at the code (and there is actually a lot of comments - very helpful thumbs up ) 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
Back to top
View user's profile Send private message
a scanner darkly
Guest






PostPosted: Wed Feb 29, 2012 1:06 pm    Post subject: Reply with quote

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).
Back to top
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Wed Feb 29, 2012 1:20 pm    Post subject: Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Wed Feb 29, 2012 1:45 pm    Post subject: Reply with quote Add User to Ignore List

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?
Back to top
View user's profile Send private message
a scanner darkly
Guest






PostPosted: Wed Feb 29, 2012 1:46 pm    Post subject: Reply with quote

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.
Back to top
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Wed Feb 29, 2012 1:55 pm    Post subject: Reply with quote Add User to Ignore List

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
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Wed Feb 29, 2012 1:59 pm    Post subject: Reply with quote Add User to Ignore List

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)
Back to top
View user's profile Send private message
Monobass
thonk.co.uk


Joined: 29 May 2009
Last Visit: 24 Nov 2014

Posts: 8237
Location: Brighton, UK

PostPosted: Wed Feb 29, 2012 4:57 pm    Post subject: Reply with quote Add User to Ignore List

Ooh I forgot about that tracking gate sequencer! Yes please!
_________________
Thonk - Modular Synth DIY + Eurorack Accessories Store
Back to top
View user's profile Send private message Send e-mail
bsmith
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 26 Nov 2014

Posts: 2620
Location: Dallas

PostPosted: Wed Feb 29, 2012 5:19 pm    Post subject: Reply with quote Add User to Ignore List

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.

_________________
Youtube Stuff | Soundcloud
Back to top
View user's profile Send private message
a scanner darkly
Guest






PostPosted: Wed Feb 29, 2012 5:24 pm    Post subject: Reply with quote

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.
Back to top
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Wed Feb 29, 2012 5:45 pm    Post subject: Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
bsmith
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 26 Nov 2014

Posts: 2620
Location: Dallas

PostPosted: Wed Feb 29, 2012 5:47 pm    Post subject: Reply with quote Add User to Ignore List

it needs to be powered up anyway....
_________________
Youtube Stuff | Soundcloud
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Wed Feb 29, 2012 5:47 pm    Post subject: Reply with quote Add User to Ignore List

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
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Wed Feb 29, 2012 5:50 pm    Post subject: Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
a scanner darkly
Guest






PostPosted: Wed Feb 29, 2012 6:02 pm    Post subject: Reply with quote

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 smile)

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 nanners
Back to top
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Wed Feb 29, 2012 6:13 pm    Post subject: Reply with quote Add User to Ignore List

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

It's seems so simple, yet the possible output could be amazing.
Back to top
View user's profile Send private message
mangobob
Wiggling with Experience


Joined: 23 Jan 2011
Last Visit: 26 Nov 2014

Posts: 349
Location: Austin, TX

PostPosted: Wed Feb 29, 2012 8:31 pm    Post subject: Reply with quote Add User to Ignore List

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?
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Wed Feb 29, 2012 11:58 pm    Post subject: Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Thu Mar 01, 2012 12:34 pm    Post subject: Reply with quote Add User to Ignore List

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
Back to top
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Thu Mar 01, 2012 3:28 pm    Post subject: Reply with quote Add User to Ignore List

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<<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
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Thu Mar 01, 2012 7:08 pm    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
ianross
Ultra Wiggler


Joined: 15 Oct 2011
Last Visit: 21 Nov 2014

Posts: 925
Location: Los Angeles

PostPosted: Fri Mar 02, 2012 2:46 am    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Fri Mar 02, 2012 10:43 am    Post subject: Reply with quote Add User to Ignore List

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

Figured keep this one for technical discussion
Back to top
View user's profile Send private message
a scanner darkly
Guest






PostPosted: Fri Mar 02, 2012 1:39 pm    Post subject: Reply with quote

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.
Back to top
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Fri Mar 02, 2012 3:22 pm    Post subject: Reply with quote Add User to Ignore List

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. smile

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
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Fri Mar 02, 2012 3:56 pm    Post subject: Reply with quote Add User to Ignore List

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<<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
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Fri Mar 02, 2012 4:20 pm    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Fri Mar 02, 2012 5:30 pm    Post subject: Reply with quote Add User to Ignore List

JP wrote:
AVR programmer just arrived. This weekend could be fun.


Prepare to enter the "code zone"
lol

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
View user's profile Send private message
phono1337
2SK30A-O


Joined: 29 Nov 2009
Last Visit: 26 Nov 2014

Posts: 1054
Location: temple of x0x

PostPosted: Sat Mar 03, 2012 8:35 am    Post subject: Reply with quote Add User to Ignore List

tagging this thread for when my avr arrives hihi
_________________
Din Sync
Meet SARA
ModSeq kits
Limited Edition T-Shirts
Back to top
View user's profile Send private message
LoFi Junglist
Wired for sound


Joined: 30 Jan 2011
Last Visit: 26 Nov 2014

Posts: 1789
Location: Adelaide, Australia.

PostPosted: Sat Mar 03, 2012 8:47 am    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
Drumdrumdrumdrum
What she said


Joined: 26 Jul 2011
Last Visit: 06 Oct 2014

Posts: 2886
Location: Tropical Australia

PostPosted: Sat Mar 03, 2012 1:17 pm    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
JP
Super Deluxe Wiggler


Joined: 07 Jan 2010
Last Visit: 27 Oct 2014

Posts: 1093
Location: NJ

PostPosted: Fri Mar 16, 2012 7:43 am    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
HueMonContact
VoltageCtrlR


Joined: 13 Aug 2010
Last Visit: 21 Sep 2014

Posts: 1846
Location: Los Angeles / Arizona

PostPosted: Fri Mar 16, 2012 12:07 pm    Post subject: Reply with quote Add User to Ignore List

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.
Back to top
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Fri Mar 16, 2012 12:27 pm    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
4mspedals
Veteran Wiggler


Joined: 21 Jul 2009
Last Visit: 26 Nov 2014

Posts: 516
Location: Portland, OR

PostPosted: Tue Mar 20, 2012 10:46 pm    Post subject: Reply with quote Add User to Ignore List

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
View user's profile Send private message
mangobob
Wiggling with Experience


Joined: 23 Jan 2011
Last Visit: 26 Nov 2014

Posts: 349
Location: Austin, TX

PostPosted: Tue May 15, 2012 8:59 pm    Post subject: Reply with quote Add User to Ignore List

Any more details on the taptempo-RCDBO and dinsync-SCM? I'd love to get my RCD clocking off dinsync.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MUFF WIGGLER Forum Index -> Eurorack Modules All times are GMT - 5 Hours
 
Page 1 of 4

 
Jump to:  
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


Mark all forums read
Powered by phpBB © 2001, 2005 phpBB Group