MUFF WIGGLER
one billion tastes and tunes
 
 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
Watch out! I just nuked 1-post user "gear101" after receiving five different complaints over the course of about 20mins that he's sending PMs to people offering to sell gear. Seems pretty fishy! I'm sure he'll be back under a different name but with the same old game. Be careful! Thanks to everyone who let me know about this guy.



MW Radio

Search for at
MUFF WIGGLER Advanced Search
RCD with longer divisions
Goto page Previous  1, 2, 3, 4, 5, 6  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: 22 Feb 2014

Posts: 1084
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: 22 Feb 2014

Posts: 1084
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: 10 Aug 2014

Posts: 908
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: 22 Feb 2014

Posts: 1084
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
_


Joined: 16 Nov 2011
Last Visit: 21 Aug 2014

Posts: 1188

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

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


Joined: 07 Jan 2010
Last Visit: 22 Feb 2014

Posts: 1084
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: 18 Aug 2014

Posts: 504
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: 22 Feb 2014

Posts: 1084
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: 18 Aug 2014

Posts: 504
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: 19 Aug 2014

Posts: 997
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
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, 5, 6  Next [all]
Page 5 of 6

 
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