electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Arduino
Reliable way to get timing right???
Post new topic   Reply to topic
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Hashtag Octothorpe



Joined: Jun 11, 2017
Posts: 57
Location: Grand Rapids MI

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1310
Location: Netherlands
Audio files: 30

PostPosted: Mon Mar 11, 2019 10:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
ixtern



Joined: Jun 25, 2018
Posts: 145
Location: Poland

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Hashtag Octothorpe



Joined: Jun 11, 2017
Posts: 57
Location: Grand Rapids MI

PostPosted: Tue Mar 12, 2019 12:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1310
Location: Netherlands
Audio files: 30

PostPosted: Tue Mar 12, 2019 3:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Arduino
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 can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use