Author |
Message |
Hashtag Octothorpe
Joined: Jun 11, 2017 Posts: 57 Location: Grand Rapids MI
|
Posted: Mon Mar 11, 2019 7:03 pm Post subject:
Reliable way to get timing right??? Subject description: I don't even know what to search Google for... to make button input fill a sequence properly |
 |
|
I'm programming a performance sequencer that takes a clock from my synth and button presses from a bank of buttons, and fills an array with that info.
I try to hit the buttons at exactly the right time, but sometimes the button press I WANTED to fill the sequence[13] array slot goes in the sequence[14] slot because I hit the button too late.
I've experimented with setting up timers for after the clock trigger comes through, a timer that runs once the button is pressed, and having the program look for both those timers to be running simultaneously, and that seems to work, but needs tweaking as is,
ANYWAY, I'm just wondering what the established strategy is for solving this problem. |
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1310 Location: Netherlands
Audio files: 30
|
Posted: Mon Mar 11, 2019 10:40 pm Post subject:
|
 |
|
I’ve done it two ways:
1- Make the array for the pulses in a sequence toggle when pressed, so you can set/reset them.
2- Make a shadow sequence where you can step thru the sequence with the press of a button for each step and set/reset the pulse you want, and when you have changed the step in the shadow sequence it is being copied to the playing sequence.
a little like: https://youtu.be/7SKAGyhyefA from 1:09 _________________ my synth |
|
Back to top
|
|
 |
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Tue Mar 12, 2019 6:36 am Post subject:
Re: Reliable way to get timing right??? Subject description: I don't even know what to search Google for... to make button input fill a sequence properly |
 |
|
Hashtag Octothorpe wrote: | I'm programming a performance sequencer that takes a clock from my synth and button presses from a bank of buttons, and fills an array with that info.
I try to hit the buttons at exactly the right time, but sometimes the button press I WANTED to fill the sequence[13] array slot goes in the sequence[14] slot because I hit the button too late.
I've experimented with setting up timers for after the clock trigger comes through, a timer that runs once the button is pressed, and having the program look for both those timers to be running simultaneously, and that seems to work, but needs tweaking as is,
ANYWAY, I'm just wondering what the established strategy is for solving this problem. |
Other way is the two-pass programming. No need for clock but sequencer must have buttons for setting notes length.
First pass - pressing buttons from the bank. Each press (note) is saved and advances to the next step. Don't forget to include pause button (note not played in current step).
Second pass - setting notes duration for each step.
I have implemented above method in a sequencer I am working on. Additionally I have "your" method to set sequence "live" with a clock then edit it step by step. But better than pushing buttons is to use MIDI keyboard and MIDI codes from it to program sequencer (I also have this). |
|
Back to top
|
|
 |
Hashtag Octothorpe
Joined: Jun 11, 2017 Posts: 57 Location: Grand Rapids MI
|
Posted: Tue Mar 12, 2019 12:58 pm Post subject:
|
 |
|
MIDI keyboard LOL I'm poor! Well, not so much "poor" as "family and life priorities demand that I not spend any real money on my synth" plus "I like being outrageously DIY."
Hmm... both Grumble's and ixtern's ideas involve editing, while I'm looking for a way to get it right the first time. The way it's programmed now the buttons do act like blender switches, in the sense that you push a button, and it turns that button on, filling that value in the sequence until a different button is pressed. It does roll over, so I can keep going until I get the sequence right and then switch it to "play, don't record" but then sometimes I screwed up the timing and it doesn't sound as intended.
This time I'm writing the sketch without any libraries, so maybe it'll be more responsive? And I will also tweak the values of the overlapping timers (and work on adapting myself to the quirks of the sequencer)... |
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1310 Location: Netherlands
Audio files: 30
|
Posted: Tue Mar 12, 2019 3:38 pm Post subject:
|
 |
|
a midi keyboard doesn’t have to be expensive.
I bought an obsolete midi keyboard (obsolete because it had a joystick connector as midi out) and that actually had two keybeds in it of a little less than 3 octaves (see picture on the left) and with use of an arduino clone and a little logic I made a midi keyboard out of it.
So all in all I had two midi keyboards voor about 20$ _________________ my synth |
|
Back to top
|
|
 |
|