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
Goto page Previous  1, 2, 3, 4  Next [all]
 
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: 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: 25 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
Display posts from previous:   
Post new topic   Reply to topic    MUFF WIGGLER Forum Index -> Eurorack Modules All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4  Next [all]
Page 3 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