sneakthief Posted February 10, 2007 Report Share Posted February 10, 2007 I'm in the process of developing a very simple pattern sequencer that supports up to 256-measure long tracks. I was wondering if anyone here had any C examples of sequencers of any kind that they'd be willing to share? I will document this project and post the code.My first version will simply play back pre-loaded patterns - so I don't need any pattern-programming capabilities yet. (31cmx17cmx10cm)Here are the specifications:1. 2 independent sequencers, one of which can be slaved to the other. 2. Each sequencer will be able to load one "song" at a time. A song is chosen by the push-button rotary encoder. 3. 16 sections per song 4. 6 tracks per section that can be muted or unmuted with the track-mute buttons (more than 6 tracks could be implemented, but that's all I need)5. 256 measures per track - this is where this really differs from the Midibox Seq4. Components:2x Cores2x AIN2x DIN2x DOUT2x 16x2 PLED - $21 US each http://home.swipnet.se/ridax/connector.htm 1x case - 14,50 euro http://www.reichelt.de/?SID=22Qq-CFn8AAAIAADkJaHM6632e15d52ed8ada3ec8c009a7e3b932;ACTION=3;LA=5;GROUP=C712;GROUPID=3354;ARTICLE=21189;START=0;SORT=artnr;OFFSET=1620x knobs - $0.35 each http://futurlec.com/SwKnob.shtml20x pots - $0.50 each http://futurlec.com/PotRot.shtml52x buttons - 0,35 euro each from http://www.pollin.de/shop/tabelle.php?ts=0&pg=OA==&a=OTU4OTA5OTk=&w=NDk2OTk42x push-button encoders - 0,75 euro each from Pollin.de The total cost is roughly 180 euro. You can save 20 euro by getting LCD's instead of PLED's.I've already ordered everything and the hardware should be finished next month. Then comes the hard part :) I'll be posting build pics next month.cheers,michelps. Thorsten - You'll be happy to know that I changed the pot spacing so there's 3cm between each post! Quote Link to comment Share on other sites More sharing options...
sneakthief Posted February 10, 2007 Author Report Share Posted February 10, 2007 Oh I forgot to mention why I'm building this:I perform live electronic dance music for a living and want something lighter to replace my aging RM1x. I currently use a Yamaha RM1x to sequence Kontakt 2, which is loaded with 6gb of my home-made loops and samples. The pots control various effects and scripts in Kontakt. In the top right, you can see my tiny silver PC that weighs only 2kg. When I turn it on, it automatically loads Kontakt with all my samples - so I don't need a monitor, keyboard or mouse!(and that lil' red box is my little Midibox Clockbox that syncs up all my sequencers :) ) Quote Link to comment Share on other sites More sharing options...
mess Posted February 10, 2007 Report Share Posted February 10, 2007 Hi Snakethief,check your PM Quote Link to comment Share on other sites More sharing options...
TK. Posted February 10, 2007 Report Share Posted February 10, 2007 I remember that I enjoyed your two live recordings months ago. Do you offer new ones for free download in the meantime? :)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
th0mas Posted February 20, 2007 Report Share Posted February 20, 2007 A good start would be clockbox, then define some struct to hold your (timed) midi events. I believe clockbox keeps track of bars/steps, which you could use to index your array of events. Quote Link to comment Share on other sites More sharing options...
sneakthief Posted February 21, 2007 Author Report Share Posted February 21, 2007 th0mas - i agree! that's exactly what i've been doing: i built a clockbox and customized it a couple of years ago - now comes the fun part.TK - i'll post some more "uCapps-enabled" live performances soon :) Quote Link to comment Share on other sites More sharing options...
sneakthief Posted March 26, 2007 Author Report Share Posted March 26, 2007 Update:Here's what's left to do:- install LED's- finsish panel wiring- finish software *heheh* I really wanted to paint the front panel black but I simply don't have time and I have 7 gigs coming up... plus it's really irritating to do a few coats of paints and a clear-coat and then suddenly some holes are too small for pots & buttons. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 27, 2007 Report Share Posted March 27, 2007 Here's what's left to do:- install LED's- finsish panel wiring- finish software *heheh* Lookin good!! Quote Link to comment Share on other sites More sharing options...
Sasha Posted March 27, 2007 Report Share Posted March 27, 2007 I`m sure kids would love that box. :) Bit colourfull for my liking but still cool. I like those yellow pointer knobs. Where did you get those? Quote Link to comment Share on other sites More sharing options...
sneakthief Posted March 27, 2007 Author Report Share Posted March 27, 2007 i decided the silver was too distracting so i'm going "the extra mile" and painting it black today.re. knobs - futurlec.com (i posted a link for all my parts at the beginning ;) re. colourful - you're the second person be pointing that out ::) honestly, when you're performing in a dark club, it really improves the user interface if you only have to quickly glance to see what find a button or knob. for example, i've got knobs permanently assigned to things like chorus, flanger, phaser, delay, lo-pass, hi-pass, bit crusher, etc... hence the very specific colour-coding. sorry to get a bit defensive, but i perform live for a living and this particular user-interface design is backed up by 10 years of experience 8) Quote Link to comment Share on other sites More sharing options...
Sasha Posted March 27, 2007 Report Share Posted March 27, 2007 Hey sneak, I already checked your links but there is no knobs I see on this picture:honestly, when you're performing in a dark club, it really improves the user interface if you only have to quickly glance to see what find a button or knob. for example, i've got knobs permanently assigned to things like chorus, flanger, phaser, delay, lo-pass, hi-pass, bit crusher, etc... hence the very specific colour-coding. sorry to get a bit defensive, but i perform live for a living and this particular user-interface design is backed up by 10 years of experienceDont you worry about my comment, I am slave of colour minimalism. :P For club useage color coding makes much more sense. Quote Link to comment Share on other sites More sharing options...
sneakthief Posted March 27, 2007 Author Report Share Posted March 27, 2007 ahhh, those knobs! they're for my DIY-modular. those are RE-AN Softtouch knobs as seen on many Euro-Rack and Frac-Rack modulars. I bought them from http://www.Rapidonline.com for 0.08p each.This is the direct link:http://www.rapidonline.com/productinfo.aspx?kw=soft%20touch&tier1=Tools%2c+Fasteners+%26+Production+Equipment&tier2=Fasteners+%26+Fixings&tier3=Knobs&tier4=16mm+soft+touch+knob&moduleno=64710 Quote Link to comment Share on other sites More sharing options...
Sasha Posted March 27, 2007 Report Share Posted March 27, 2007 They look great! Thanks sneakthief. Quote Link to comment Share on other sites More sharing options...
sneakthief Posted March 28, 2007 Author Report Share Posted March 28, 2007 ok time to finish the software:(the two 1/4" jacks are for switching patterns with footpedals) Quote Link to comment Share on other sites More sharing options...
sneakthief Posted March 30, 2007 Author Report Share Posted March 30, 2007 update - i'm thick in the middle of programming it... ugh ;)midi clock is sending, tempo & transport controls are working, buttons respond to section changes and pots transmit midi cc's.still have to finish implementing song loading, track mutes and reading sequences from arrays.wish me luck!uhhh, i think i'm going to have to drop the voltage to the blue led's or do some PWM tricks 8) Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 30, 2007 Report Share Posted March 30, 2007 Hhehehe I think it's interesting that we've taken a completely different approach - you built hardware first, then software - I'm the other way around :)What kind of format are the songs? Is it linear or step based or..?? Quote Link to comment Share on other sites More sharing options...
sneakthief Posted March 31, 2007 Author Report Share Posted March 31, 2007 In my case, it makes perfect sense to design the user-interface first because the software can easily be modified to fit my workflow.Software Description:Over the last decade, I've written all sorts of material (over 100 different songs, some completely finished, some very raw) on my rm1x and rs7000's in pattern-mode. Pattern-mode consists of up to 16 sections, each having 16 tracks. This is the basic sequencing paradigm that i wanted to use. For my live performances, I need control over groups of tracks and not each individual track. Look at the following typical example on my rs7000:Track Instrument----- -----------1 kick2 snare3 hihat4 claps5 rides6 other percussion7 vocal samples89 bass10 melody 111 melody 2 12 pad 13 sfx 114 sfx 215 sfx 316Since it's more efficient to control instrument groups, I spent a month recording *all* of my studio synths and samplers and broke down songs into various 1-16 measure loops, so now the typical track looks like this:Track Instrument----- -----------1 kick2 all other drums3 bass4 melodies 1+2, pads5 vocals 6 sfx 1-3So, this gives me the ability to improvise with song structure, as well as being able mix & match parts of various songs in order to create a spontaneous live performance, albeit with bigger building blocks than your traditional midi sequencer. However since I also use my rs7000 live, I still have very fine control over midi notes and such with one half of my setup.The other huge benefit of all the sampling is that I don't have to bring as much gear when I perform, and yet Kontakt's scripting language is very powerful and allows me to retain the expressiveness over how the samples are played back.The most important aspect is being able to respond to the dancefloor, and this setup accomplishes that nicely. The hardest part is finding a balance between automation and ability to control. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 31, 2007 Report Share Posted March 31, 2007 This is a really interesting concept man. Sounds like musical lego made from homemade bricks ;DI think it oughta be in the User Projects forum if you feel like documenting it on the wiki too :) Quote Link to comment Share on other sites More sharing options...
julienvoirin Posted April 2, 2007 Report Share Posted April 2, 2007 yeah , that rocks ! :Dfinally, when you explain what you play it's exactly what i want to do with my MMR.did you receive the questionnar ?cheers Quote Link to comment Share on other sites More sharing options...
sneakthief Posted April 2, 2007 Author Report Share Posted April 2, 2007 Julien: I got your questionnaire and will have it ready in the next day or two :)cheers,michel Quote Link to comment Share on other sites More sharing options...
sneakthief Posted April 3, 2007 Author Report Share Posted April 3, 2007 ok, i'm going to use the sequence as is this weekend and then implement the suggestions posted here next week.so just for fun, here's the crappy code for my mostly-functional sequencer:http://www.sneak-thief.com/sneakyseq/sneaky-seq-0.1a.zipcaveat emptor: i'm not sure who else will find this useful because it's really customized to how i trigger loops in kontakt.cheers,michel Quote Link to comment Share on other sites More sharing options...
stryd_one Posted April 4, 2007 Report Share Posted April 4, 2007 Heya bud.Try these. I've broken that notorious switch statement down so as to make a nice clean jumptable. The app now uses five temp variables instead of 37, and doesn't flip around like it used to. 25-26 should work now :)This is definitely the way to go with switch statements in SDCC.Let me know :)Edit: Does 'i' really need to be an int?mclock.hmclock.cmclock.hmclock.c Quote Link to comment Share on other sites More sharing options...
sneakthief Posted April 4, 2007 Author Report Share Posted April 4, 2007 nice one! it works great - thanks :) it's official - i ower stryd_one a beer (or a reasonable equivalent or facsimile thereof)you're down under right? i'm trying to get an oz tour together so i'm dead serious! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted April 4, 2007 Report Share Posted April 4, 2007 Wicked :D I'll take a mineral water at your Melbourne gig hehehehMaybe one for after the gig, but I'd do that with your other switch statement in main.c too...Thanks for being thrashed by this "feature" so we don't have to! Quote Link to comment Share on other sites More sharing options...
sneakthief Posted April 4, 2007 Author Report Share Posted April 4, 2007 here's the fully-functional source, complete with all my song data *lol*http://www.sneak-thief.com/sneakyseq/sneakyseq%20v1.zipcheers to TK, stryd-one, mess, audiocommander and everyone who helped!FYI - Timeline:I planned a rough draft of the algorithm last year, but since then only spent a few hours here and there doing the user interface (which to me is the most important).I only seriously decided to build it last month, then I sourced all the parts and received them a couple of weeks ago. I spent 8 days building the hardware and another 7 days to get the software to a working state.I feel like I've been shot through a cannon!! :Pbest regards to the midibox cru,michelps. mineral water is fine with me too because i don't drink at gigs :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.