Friday, April 27, 2018

Designing a Polyphonic Music Keyboard Algorithm.


-->
After several weeks of development, I’m discovering quite how hard programming a polyphonic keyboard for Eurorack is!  There are several well-known algorithms for dealing with voice stealing, that is, when your system is 4 note polyphonic and someone presses 5 notes,  these can be dealt with buy top note priority, bottom note priority or last note priority (http://electronicmusic.wikia.com/wiki/Note_priority).  But a polyphonic keyboard for Eurorack produces some unique problems.

First of all, lets describe the problem, our controller has 4 voltage outputs coupled with 4 gates.  A simple algorithm will assign the first note pressed to the first output, the second note to the second and so on.  This works pretty well, but has a major problem, voice changing.    Suppose we press two keys,  a low C (C0) and a  high A (A3),  C0 will go to output 1 and A3 to output 2. If you now release C0, the A3 will change to output 0.  The problem is the patch connected to output 0 might be very different to the patch on output 1.  When the A3 moves from output 1 to output 0 the sound produced will be very different.

To solve this, the algorithm needs to make the notes stick to a output.  In this situation note A3 once assigned to output 1 will stick to it that output until it is released, other new notes are assigned to free outputs, if no notes are free the new note is ignored!  This works pretty well but introduces a new problem, it is impossible to play the keyboard in legato mode!

Suppose you press C0 and then A3.  You want to move the A3 to G3 smoothly so that A3 moves to G3 on output 1.  What happens with the “Sticky” algorithm is that G3 is assigned to output 2 because for a short while both A3 and G3 are pressed together:

Ouput
Key
Keys
Keys
Keys
0
C0
C0
C0
C0
1
A3
A3
2
G3
G3
3

The problem here is that the algorithm needs to distinguish between a new note being pressed and held and the player playing in legato mode.  The difference is in legato mode a new key is pressed and then an older one released within a certain time, so simply delay the new note for a short period of time to see if this new note is part of a legato mode. This of course does mean that adding the new note will be delayed slowing down the playing mode.

This is the current state of play, I’m experimenting with the delay and seeing what effect it has on the playability of the keyboard. I can’t help feeling there is a better way, let me know if you know of one !

The source code is at:


125 comments:

  1. Hi Andy,

    I've posted a comment on the GMSN! Forum...

    https://forum.gmsn.co.uk/t/anyone-know-a-polyphonic-algorithm/540

    ReplyDelete
    Replies
    1. The tips for improving SEO on websites were practical and easy to understand.

      Delete
  2. This article is nicely written. A very well written guide to take care of your furnace.
    web development agent service in punjab

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Nice blog post information
    Sanjary Kids is one of the best play school and preschool in Hyderabad,India. Give your child the best preschool experience by choosing the best playschool of Hyderabad in Abids. we provide programs like Play group,Nursery,Junior KG,Senior KG,and provides Teacher Training Program.
    Preschool in hyderabad

    ReplyDelete
  5. Good blog information of the topic

    Sanjary Academy is the best Piping Design institute in Hyderabad, Telangana. It is the best Piping design Course in India and we have offer professional Engineering Courses like Piping design Course, QA/QC Course, document controller course, Pressure Vessel Design Course, Welding Inspector Course, Quality Management Course and Safety Officer Course.
    Piping Design Course
    Piping Design Course in Hyderabad ­
    Piping Design Course in India­

    ReplyDelete
  6. Great information of the blog I liked it

    Sanjary Academy provide pressure vessel design, quality management system course piping design course, qa/qc course and document controller course.
    Welding Inspector Course
    Safety officer course
    Quality Management Course
    Quality Management Course in India

    ReplyDelete
  7. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
    BCOM 2nd Year TimeTable 2020

    ReplyDelete
  8. I was very interested in the article , it’s quite inspiring I should admit. I like visiting your site since I always come across interesting articles like this one. Keep sharing! Regards. Read more about
    website Designing Services in Islamabad

    ReplyDelete
  9. Thanks for your information, this is nice and helpful… Definitely going to share this article to my friends.
    India VPS Hosting

    ReplyDelete
  10. Impressive, this is very important to know for all of us about this knowledge. I really love this blog and surely recommend to my friends. Thanks keep it up
    Dubai VPS Hosting

    ReplyDelete
  11. Thank you for sharing this article I would like to share this. App Development UK

    ReplyDelete
  12. Nice post it is really an interesting article we are also providing the web design services in bangalore. We are the leading
    Website Designers in Bangalore
    Web Design Companies in Bangalore

    ReplyDelete
  13. This is exactly why advertising and marketing that you just relevant pursuit before posting. It will likely be simple to jot down exceptional write-up this way. Smart contract software development in delhi

    ReplyDelete
  14. Excellent Blog. I really want to admire the quality of this post. I like the way of your presentation of ideas, views and valuable content. Top 10 Makeup Artists in Kolkata

    ReplyDelete
  15. I really appreciate your Post. the post has excellent tips which are useful. this post is good in regards of both knowledge as well as information...blockchain Software development solution bangalore

    ReplyDelete
  16. Excellent Blog. I really want to admire the quality of this post.
    MLM software development

    ReplyDelete
  17. It is actually in a similar fashion an awesome write-up i always most certainly savored investigating. It's not at all really day-to-day i always cultivate the method to seek out a single thing. Smart contract Software development Ahmedabad

    ReplyDelete
  18. I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates. MLM Software Service Provider Mumbai

    ReplyDelete
  19. Excellent Blog. I really want to admire the quality of this post. sexologist course in allahabad

    ReplyDelete

  20. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing. sexologist course in allahabad

    ReplyDelete
  21. “Thank you so much for sharing all this wonderful info It is so appreciated!!!” “You always have good humour in your posts. So much fun and easy to read!
    ERC20 Token Developer In delhi

    ReplyDelete

  22. Great post this article is very unique and very informative thanks for sharing!....
    erectile dysfunction specialist near me

    ReplyDelete
  23. Great Article!! Thanks for sharing this is very unique Information… ERC20 TOKEN DEVELOPMENT COMPANY IN NEW YORK

    ReplyDelete
  24. Nice Blog ..
    Amazing Blog ... I learn more thing with the help of your blog
    Thanku.
    SMART CONTRACT DEVELOPER

    ReplyDelete
  25. Great Article!! Thanks for sharing !!!!this is very unique Informative blog… ERC20 Token Developer In New York

    ReplyDelete
  26. It is actually all at once a great put which i quite savored surfing. Is not really routine that give the outlook to see items. top 10 sexologist doctors in allahabad

    ReplyDelete
  27. very informative blog this will help a lot to website design and very useful for developers
    i am very Thankful for this useful content. More over if you share more logics about web development

    ReplyDelete

  28. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.top 10 sexologist doctors in allahabad

    ReplyDelete
  29. This site helps to clear your all query.
    This is really worth reading. nice informative article.
    BCom 3rd year result
    BA 2nd year result

    ReplyDelete
  30. Excellent Blog. I really want to admire the quality of this post.gupt rog in Allahabad

    ReplyDelete
  31. It's excellent article post. Designing a Polyphonic Music Keyboard Algorithm I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing. But I'll give you a small knowledge about Server Hosting. so I’d recommend to customers a hosting plan Onlive Server. because it provides the USA VPS Hosting and here is many more plans with fully knowledge of hosting are at on very low-cost.

    ReplyDelete
  32. Excellent Blog. I really want to admire the quality of this post.erectile dysfunction specialist near me

    ReplyDelete
  33. Nice post it is really an interesting article.We are also providing the website design services in mumbai. We are
    best website design companies in mumbai
    best website designers in mumbai

    ReplyDelete
  34. I am so grateful for your article.Really looking forward to read more.
    sexologist Doctors

    ReplyDelete
  35. Thanks for sharing such a great information with us. Your Post is very unique and all information is reliable for new readers. If you interested to take Cheap Dedicated Server which grow your business at high point.

    ReplyDelete
  36. I find this article informative and useful, so I am sharing it with my friends………………….!!!
    Tron blockchain development services

    ReplyDelete
  37. Excellent Blog. I really want to admire the quality of this post.Sexologist in Allahabad

    ReplyDelete
  38. Fantastic article!!! I truly enjoy this webpage; it's fantastic....Best Sexologist in Prayagraj

    ReplyDelete
  39. I find this article informative and useful, so I am sharing it with my friends………………….!!!

    BUILD NFT MARKETPLACE

    ReplyDelete
  40. This blog is very informative and useful thank you for sharing.....Sexologist in Allahabad

    ReplyDelete
  41. Thank you so much for sharing all this wonderful information.sexologist Doctors

    ReplyDelete
  42. It's really nice and meanful. It’s really cool blog.sexologist Doctors

    ReplyDelete
  43. This is a great inspiring article .I am pretty much pleased with your good work .You put really very helpful information.top 10 sexologist doctors in allahabad

    ReplyDelete
  44. Its very amazing post i am just read about your article its very useful..sexologist Doctors

    ReplyDelete
  45. I find this article good and beneficial, so I am sharing it with my friends………………….!!!

    BEST NFT MARKETPLACE

    ReplyDelete
  46. Techtra Digital is the best Digital Marketing Company in Delhi India for Website Designing, E-Commerce Account Management Services, Social Media Marketing, SEO.

    SEO Services in Delhi
    Social Media Marketing Agency In Delhi
    PPC Services In Delhi
    Graphic Designing Company in Delhi

    ReplyDelete
  47. I read your blog it’s very beneficial and informative, so I am going to share very informative blog to all users………….!!!
    NFT MARKETPLACE DEVELOPMENT

    ReplyDelete
  48. Very interesting, good job and thanks for sharing such a good blog. sexologist course in allahabad

    ReplyDelete
  49. Great post this article is very unique and very informative thanks for sharing!.sexologist Doctors

    ReplyDelete
  50. Awesome post, I am pleased to be on this website,you have shared useful content which i like reading. Thanks for making this post...... Sexologist in Allahabad

    ReplyDelete
  51. I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much!... gupt rog in allahabad

    ReplyDelete
  52. awesome article!!!! Interesting blog is wonderful excellent very nice thanks for sharing information.
    gupt rog in allahabad

    ReplyDelete
  53. Its very amazing post i am just read about your article its very useful.. top 10 sexologist doctors in allahabad

    ReplyDelete
  54. Thanks For sharing this Superb article.I use this Article to show my assignment in college.it is useful For me Great Work. erectile dysfunction specialist in allahabad

    ReplyDelete
  55. This is an awesome motivating article.I am practically satisfied with your great work.You put truly extremely supportive data. Keep it up. Best Sexologist in Prayagraj

    ReplyDelete
  56. SS-WEBSOLUTION is a Professional Web Design and Digital Marketing Agency in Pakistan. We have been working in the field of digital marketing since 2014. Now we have expanded our services to web designing, online reputation management, digital marketing , social media , SEO , SMO and much more. Our Dedicated Team is ready to serve you better than anyone else so please feel free to contact us at any time.

    ReplyDelete
  57. Fabulous post✅ you have denoted out some fantastic points regarding✅.... Best Sexologist in Prayagraj

    ReplyDelete
  58. Great post this article is very unique and very informative thanks for sharing!.. Best Sexologist in Prayagraj

    ReplyDelete
  59. Your article is really great. I like the way you wrote this information.....sexologist Doctors

    ReplyDelete
  60. Awesome article!!! nice blog interesting is wonderful... gupt rog in allahabad

    ReplyDelete
  61. Excellent blog.I like to read your blog very interesting and knowledgable. Best Sexologist in Prayagraj

    ReplyDelete
  62. Very interesting, good job and thanks for sharing such a good blog... gupt rog in allahabad

    ReplyDelete
  63. Excellent Blog. I really want to admire the quality of this post.... gupt rog in allahabad

    ReplyDelete
  64. DigisolHub
    Do you want a website that makes you look like an expert in your field? Do you want to convert more customers who are already interested in what you have to offer? Do you need to close more sales this year and earn a better return on investment for your business….read more

    ReplyDelete
  65. Fabulous post✅ you have denoted out some fantastic points regarding✅... erectile dysfunction specialist in allahabad

    ReplyDelete
  66. Great Post. I really appreciate the efforts you put into compiling and sharing this piece of content.
    Inovies

    ReplyDelete
  67. Nice post keep sharing such a wonderful post with us.sexologist Doctors

    ReplyDelete
  68. Fabulous post✅ you have denoted out some fantastic points regarding✅.. Best Sexologist in Prayagraj

    ReplyDelete



  69. Gladias the best Web Design Company In Bangalore has a dedicated department for all your design needs. We follow a systematic process of design/redesign to create your website with all the features that you require as well as provide an appealing and elegant online presence. Gladias Consulting Web Design Company

    ReplyDelete
  70. Excellent blog. I like to read your blog very interesting and knowledgeable. sexologist course in allahabad

    ReplyDelete
  71. This comment has been removed by the author.

    ReplyDelete
  72. Thanks for this information. It is very helpful for us. Connected with us for verifiedwhatsappbusiness msgclub.

    ReplyDelete