 |
Muff's Modules & More cats and modular synths, but mostly cats
|
| View previous topic :: View next topic |
| Author |
Homebrew step sequencer |
Paradigm X Veteran Wiggler
Joined: 02 Nov 2010 Last Visit: 19 Jun 2013
  Posts: 745
|
Posted: Tue May 22, 2012 2:30 pm Post subject: |
 |
|
|
| ZoeB wrote: | | The x0xb0x's pattern rotate... are we talking about moving everything one note forwards and backwards, like "shift pattern left" and "shift pattern right" in ReBirth? That's a fantastic idea, let me add it to the to-do list, thanks! |
yush. very cool.
Other cool things;
Instant transpose by holding whatever key
Variable start and end, with wtart later than end, reverse.
Half/Double time
Cool
 |
|
| Back to top |
|
 |
roglok Ultra Wiggler
Joined: 30 Dec 2011 Last Visit: 19 Jun 2013
 Posts: 751 Location: germany
|
Posted: Tue May 22, 2012 2:52 pm Post subject: |
 |
|
|
I just downloaded your python script from github, but I'm having a hard time getting it to run properly on a mac.
I'm hopeless as a programmer and never tried python, so there's not much I can do about it. The script runs and the interface seems to work, but I'm getting the following bugs after 16 steps have played:
| Code: | File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2. 6/curses/__init__.py", line 33, in initscr
_curses.error: setupterm: could not find terminal |
| Code: | File "/Users/roglok/Desktop/ZoeB-stepper-6a5a159/python/stepper.py", line 286, in incrementTime self.loadPattern(FILENAME)
NameError: global name 'FILENAME' is not defined |
But it's enough to get a rough idea and I have to say it looks very promising! Will the hardware reflect the tracker interface? How do you imagine the hardware interface anyway? |
|
| Back to top |
|
 |
ringroad1 Common Wiggler
Joined: 18 Oct 2010 Last Visit: 11 Jun 2013
  Posts: 74 Location: Coventry, UK
|
Posted: Tue May 22, 2012 3:04 pm Post subject: |
 |
|
|
hey roglok, looks like you're using Python 2.6 - think it needs Python 3.
Got it working happily here on Snow Leopard with Python 3 installed via Homebrew. |
|
| Back to top |
|
 |
roglok Ultra Wiggler
Joined: 30 Dec 2011 Last Visit: 19 Jun 2013
 Posts: 751 Location: germany
|
Posted: Tue May 22, 2012 3:37 pm Post subject: |
 |
|
|
hey, thanks for the hint. unfortunately it doesn't help. i installed python 3 and even cloned the git repository via command line, but i'm getting this mess after the pattern has run once:
| Code: |
120 . Pattern select . Pattern length o Tempo . Copy NTE SL GT AC
W E R T Y I C-2 00 00 00
9 Transpose 0 C-2 00 00 00
. . . . . C-2 00 00 00
o C# . D# . . F# . G# . A# . . . . . .Traceback (most recent call last):S D- D E- F- G G- H A- J B- NT DN UP AC SL BK C-2 00 00 00
Z File "stepper/python/stepper_1_prototype.py", line 63, in <module>
FW C-2 00 00 00 sequencer.incrementTime(incrementLengthInMilliseconds) A C-2 00 00 00
. Song loop 2 File "/Users/roglok/Sites/stepper/python/stepper.py", line 286, in incrementTime C-2 00 00 00
Space bar to qui self.loadPattern(FILENAME)tch 1638 C-2 00 00 00
CVNameError: global name 'FILENAME' is not defined C-2 00 00 00
CV2 N/A roglok-mbp:Sites roglok$
Gate 0000 C-2 00 00 00
C-2 00 00 00
|
|
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Tue May 22, 2012 4:21 pm Post subject: |
 |
|
|
Thanks for trying this out, everyone!
I believe the filename bug is something I broke earlier on, and fixed earlier today. I wasn't very consistent with where it was defined, basically. Try "git pull origin master" (or probably simply "git pull") to get the latest version, and see if that works.
And the other news: I've implemented Sync24 output (changeable to Sync48 by changing a constant in the code). You have to slow it down to about 1BPM to actually see it in action. I wasn't sure if the run/stop signal could go up at any time, or if it had to politely wait for the next time the clock pulse starts to go high. I decided to play it safe and opt for the latter, to ensure (hopefully!) rock solid timing.
I'm not very up on hardware, but I'm hoping it should be as easy to implement as finding two more digital outs to assign the sync output to, and soldering them up to the appropriate pins of a DIN socket. That may be wishful thinking on my part, though. :)
Let me think about the other features later on. Nina (my partner) has pointed out to me how simple Sync24 input should be, so I'll try that next, probably later this week. _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
roglok Ultra Wiggler
Joined: 30 Dec 2011 Last Visit: 19 Jun 2013
 Posts: 751 Location: germany
|
Posted: Tue May 22, 2012 4:55 pm Post subject: |
 |
|
|
brilliant! thanks for the fixes. works like a charm now  |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Tue May 22, 2012 5:01 pm Post subject: |
 |
|
|
OK, a Sync24 input question... if you get the run/stop gate at any time other than when one of the clock pulse triggers is starting, are you supposed to start playing immediately or wait for the next clock pulse? For the input, I really need to follow the existing conventions if I want this sequencer to sync up properly with other devices...
| roglok wrote: | | brilliant! thanks for the fixes. works like a charm now :tu: |
Yay, good to hear! ^.^ I hope you have fun with it. :) _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
roglok Ultra Wiggler
Joined: 30 Dec 2011 Last Visit: 19 Jun 2013
 Posts: 751 Location: germany
|
Posted: Tue May 22, 2012 5:08 pm Post subject: |
 |
|
|
| Quote: | | if you get the run/stop gate at any time other than when one of the clock pulse triggers is starting, are you supposed to start playing immediately or wait for the next clock pulse? |
The latter. When Start/Stop is high, the slave is waiting for clock pulses. If there is no clock signal, the sequencer won't do anything. Think of it as a clock signal gate...
EDIT: The implementation in your python script seems just right in that the clock is output constantly, not just when Run/Stop is high... |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Wed May 23, 2012 2:23 am Post subject: |
 |
|
|
| roglok wrote: | | Quote: | | if you get the run/stop gate at any time other than when one of the clock pulse triggers is starting, are you supposed to start playing immediately or wait for the next clock pulse? |
The latter. When Start/Stop is high, the slave is waiting for clock pulses. If there is no clock signal, the sequencer won't do anything. Think of it as a clock signal gate...
EDIT: The implementation in your python script seems just right in that the clock is output constantly, not just when Run/Stop is high... |
Great, thanks! :D I'll do it that way again then. _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Thu May 24, 2012 6:29 am Post subject: |
 |
|
|
| roglok wrote: | | Slave to DIN Sync would be essential for me. |
Try it now. :)
Sync24 input isn't fully implemented yet: it should get the frequency right, but not the phase, so it should play at the right speed, but lagging behind a bit. Fixing that will probably require a rewrite that's some way overdue and would allow more general timing related features.
As of commit 59136caac7d2afec0a388f5c2672e6606ba65145, you can't actually see this working unless you comment out lines 612 to 614, because as soon as you press the run/stop (Sync24 gate) key, it thinks you've instantly let go of it again, and stops playing before it even started. If you comment those lines out, it disables stopping, so it steams ahead like a runaway train until you quit.
But if you were to port it to C, rewrite it slightly, write it out to an Arduino board, and solder the digital inputs to a DIN cable... it theoretically ought to work. That's a while away yet, but it will happen. :)
So even with just using digital connections, that's still enough to play with that you could make a programmable drum machine sequencer with Sync24 in and out, tape sync in and out (more on those later, at least tape sync out seems pretty simple to implement...), and several channels of actual drum module triggering outputs. Then once you throw a few DACs into the mix, we're in business for acidlines. :D
So it's getting there, bit by bit... _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
roglok Ultra Wiggler
Joined: 30 Dec 2011 Last Visit: 19 Jun 2013
 Posts: 751 Location: germany
|
Posted: Thu May 24, 2012 8:11 am Post subject: |
 |
|
|
| sounds great, zoe! i'm on vacation so i can't check it out atm, but will do so when i get back... |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Thu May 24, 2012 12:06 pm Post subject: |
 |
|
|
OK then... does anyone have any more information on Tape Sync (frequency shift keying), or any examples?
It sounds like you take the Sync24 / DIN Sync clock pulse, and whenever it's high you output a high frequency tone, and whenever it's low you output a low frequency tone. (Hey, I think I finally understand what modems and early home computers' tape recorders do! Modulating and demodulating, that makes sense...) It's still just square waves, so still a boolean value being sent to a simple digital output. Fine, I think I've got that working. Some sources (An Introduction to Tape/MIDI Sync and the MQX-32 and Sync or Swim?) claim the frequencies are 2400Hz and 1200Hz respectively, while others (MC-4 service notes, page 4) say "approximately" 2100 and 1300. I'm guessing Roland are more authoritative on the matter, if a little vague. I'm not sure how accurate this needs to be...
The main thing I'm not sure about, though, is how Tape Sync knows when to start and stop. This is a separate signal entirely in DIN Sync, whereas Tape Sync only uses one tape channel. The MC-8 owner's manual, pages 107 and 108, make mention of starting and stopping the track, with a bit of breathing room around it. Maybe it just says this to ensure you actually leave the clock pulse running long enough, but I'm hoping the equivalent of the run/stop signal gets passed along somehow. That would certainly seem to be the point of synchronisation, to not just match the speed but also the start time. Plus the manual says this modifies the carrier, insinuating either that it's further modified once you start playback, or that it wasn't modulated for an audible medium beforehand maybe (as in, maybe it sends out the raw Sync24 until the sequence is started)? Perhaps the sync signal is only output to the Sync24 or Tape Sync output in a mutually exclusive manner, so the manual's saying it's neither modulated nor output to tape at all until the song's started? Wouldn't that mean the slave device would only know the correct tempo after the song's already started? I have no idea...
So does anyone know how Tape Sync works, or better yet, have a .wav or .aif file example of it in action that I could dissect?
Thanks! _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
ringroad1 Common Wiggler
Joined: 18 Oct 2010 Last Visit: 11 Jun 2013
  Posts: 74 Location: Coventry, UK
| |
| Back to top |
|
 |
darenager Bad Mother Fucker
Joined: 01 Sep 2009 Last Visit: 19 Jun 2013
   Posts: 3222 Location: England
|
Posted: Thu May 24, 2012 2:19 pm Post subject: |
 |
|
|
IIRC tape sync uses an initialising tone before anything starts to sync, then once the tone starts to modulate the slave will start. Just curious as to why you are thinking of implementing tape sync? _________________ http://www.youtube.com/darenager
http://darenager.bandcamp.com/
http://twitter.com/daren_ager
"Man, the living creature, the creating individual, is always more important than any established style or system" - Bruce Lee |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Thu May 24, 2012 3:08 pm Post subject: |
 |
|
|
Wow, thank you very much! :D Yes, it makes much more sense hearing and seeing it in action. So it just starts off with the low tone, then when you press play it starts actually transmitting the clock pulses. Which is curious as it insinuates that upon syncing to it on playback, it really won't know the BPM until after it starts playing. Huh. Thanks again, that was really helpful!
| darenager wrote: | | IIRC tape sync uses an initialising tone before anything starts to sync, then once the tone starts to modulate the slave will start. Just curious as to why you are thinking of implementing tape sync? |
Yes, that looks to be the case. As to why, well implementing DIN sync is half the work of implementing tape sync anyway, I might as well put in the extra few lines of code and have even more functionality! I mean, I wasn't going to implement either until someone asked for DIN sync, but it's fun learning how things work! _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
bananeurysm Wiggling with Experience
Joined: 14 Jun 2009 Last Visit: 19 Jun 2013
    Posts: 414 Location: Portland, OR
|
Posted: Thu May 24, 2012 3:21 pm Post subject: |
 |
|
|
Sweet! Looking forward to seeing this in action!
I sincerely hope you're not emulating the mc202 sequencer. I have a LOT of experience using it - and it only gets more and more frustrating the more you use it. I nominate it for worst internal sequencer ever. x0x on the otherhand is pretty nice! |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Fri May 25, 2012 3:18 am Post subject: |
 |
|
|
| bananeurysm wrote: | Sweet! Looking forward to seeing this in action!
I sincerely hope you're not emulating the mc202 sequencer. I have a LOT of experience using it - and it only gets more and more frustrating the more you use it. I nominate it for worst internal sequencer ever. x0x on the otherhand is pretty nice! |
Ha... well I was considering making emulators of various old sequencers (The Digital Sequencer, anybody?), mostly for historic preservation purposes (imagine if all the synthpop music written on the MC-8 was preserved, but no one knew how to play it). But if there's no interest, I probably won't. What I definitely am doing right now is making my own idiosyncratic sequencer that's taking ideas from all over the place, mostly the TB-303 (slide, hardware interface, multiples of equidistant semiquaver notes and rests only) and Scream Tracker (software interface, and semiquavers only again). This one's less about preserving history or being versatile with note lengths enough to play anything, and more about having a reasonably easy to use interface that lets you key in pitches, not numbers, for quick, simple and reasonably intuitive acid techno production. _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Fri May 25, 2012 5:20 am Post subject: |
 |
|
|
Oh, I think I just properly worked out how the syncing works. I think it might be much simpler than I realised. What I've got Stepper currently doing is timing the distance between the last two pulses, and extrapolating the tempo from that, but that's no good if the song has to start before it's heard some pulses (so fine for DIN sync, but no good for tape sync). But now I'm thinking that's really overly complicating things, that the pulses aren't used to synchronise clocks among different machines after all; maybe the pulses are the clock, and the slave's internal clock gets disabled... maybe the slave machine just has to count pulses from the master, ignoring entirely how long they take to arrive, and if it's 24 pulses per quarter note, and the device only plays sixteenth notes, then it merely has to only increment a step once every six pulses. Hence, it doesn't need to be led in to get adjusted to the tempo, and the timing's bang on no matter how much you change the tempo half way through a song. It's a simple and elegant solution, great.
The only point at which it breaks down is if you need to update something more than 24 times per quarter note, such as portamento. Which further explains why the TB-303 implements sliding in hardware, not software (TB-303 service notes, page 5). So does that mean the TB-303's slide length, the time it takes to glide from one note to the next, isn't just independent of the pitch distance, but also independent of the tempo? And if that's the case, does anyone know how long it takes? I've currently got Stepper sliding only for the last half of a sixteenth note, so it takes a 32nd of a bar exactly. This seemed like an elegant solution until it had to be hardware and interface with other machines...
I guess I can refactor most of Stepper to work the simple way, but keep the portamento working the complex way. That way, the timing of everything except the portamento will be absolutely spot on always, and it will still be able to have tempo dictated portamento lengths, that may be slightly out if it's slaving to tape sync and there's portamento on the very first note. That's probably an acceptable trade off... _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
ringroad1 Common Wiggler
Joined: 18 Oct 2010 Last Visit: 11 Jun 2013
  Posts: 74 Location: Coventry, UK
|
Posted: Fri May 25, 2012 12:59 pm Post subject: |
 |
|
|
There's some discussion of the portamento/slide of the 303 and 202 over at ye olde hyperreal - seems like the 303 is constant time, as you suspect. Dunno how long it takes tho.
Robin Whittle wrote some good stuff on the triggering of the 303 slide which might come in handy:
http://www.firstpr.com.au/rwi/dfish/303-slide.html
Like I say, personally I'd take a look at the 202 slide circuit, but if you are trying to make several voices I can see why you'd be tempted to do it in software. |
|
| Back to top |
|
 |
ZoeB Common Wiggler
Joined: 26 Jul 2011 Last Visit: 19 Jun 2013
 Posts: 216 Location: UK
|
Posted: Fri May 25, 2012 1:27 pm Post subject: |
 |
|
|
| ringroad1 wrote: | There's some discussion of the portamento/slide of the 303 and 202 over at ye olde hyperreal - seems like the 303 is constant time, as you suspect. Dunno how long it takes tho.
Robin Whittle wrote some good stuff on the triggering of the 303 slide which might come in handy:
http://www.firstpr.com.au/rwi/dfish/303-slide.html
Like I say, personally I'd take a look at the 202 slide circuit, but if you are trying to make several voices I can see why you'd be tempted to do it in software. |
Interesting, thanks. I think the TB-303 essentially has a slew limiter that can be turned off and on, but I don't really want to buy a VC slew limiter just for this, and as I'm not very knowledgeable regarding electronics, I can't make my own either.
Judging by that second link (I hadn't read that one before, thanks!), I've got the gate staying open correctly, but I'm doing the anticipation thing, sliding during the second half of the first note, whereas it should actually be on roughly the first half (or some other length) of the second note... which makes sense given that these synths seem to always be simpler than I'm imagining! So in the actual TB-303, the sequencer's pitch output is completely unaffected by slide, only the gate output, and another gate-style output for the slew limiter. Interesting.
I'll reprogram Stepper to not be predictive then, thanks! _________________ http://zoeblade.bandcamp.com/ |
|
| Back to top |
|
 |
|
|
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
|
|