Informática musical

Viktor NV-1, sinte Web MIDI gratuito de código abierto

Nikolay Tsenkov ofrece, en una línea estética que recuerda a los Aira de Roland, un sintetizador web con código 'open-source'. Para usarlo basta acceder con un navegador (Chrome) compatible con Web-MIDI y Web-Audio a la página http://nicroto.github.io/viktor/

Pero siendo código abierto, además de usarlo para tocar conectando un teclado MIDI al ordenador, y abriendo a continuación el navegador,  podremos también usarlo para aprender cómo se programan este tipo de sistemas y modificar a nuestro antojo el desarrollo adaptándolo a nuestras necesidades.

Basado en javascript y con aplicación de Web-Audio y Web-MIDI, el código fuente está disponible en https://github.com/nicroto

Como sintetizador en sí, ofrece una estructura tradicional sustractiva que recuerda a la del clásico minimoog con tres osciladores, ruido, filtro paso bajo, etc. Pero cuenta con polifonía y envolventes separadas para amplitud y filtro, además de incorporar retardo y reverb.
Una buena ocasión para jugar con un sinte y para entender el funcionamiento tanto de la API Web-MIDI, como la creación de sistemas audio en Web-Audio aprovechando los módulos que incorpora tanto para síntesis como para efectos. Quizá, porqué no, para tomarlo como base para desarrollar alguna otro idea.

Actualmente sólo con Chrome se podrá disfrutar al completo, tocándolo desde un teclado externo. Safari cuenta con implementación de Web-Audio, pero no Web-MIDI, lo que impedirá controlarlo desde un teclado externo mientras no haya una actualización. Firefox está avanzando hacia soportar correctamente estas APIs, pero no sería todavía un navegador adecuado para usar este NV-1, y Explorer mejor olvidarlo.

Pablo Fernández-Cid
EL AUTOR

Pablo no puede callar cuando se habla de tecnologías audio/música. Doctor en teleco. Ha creado diversos dispositivos hard y soft y realizado programaciones para músicos y audiovisuales. Toca ocasionalmente en grupo por Madrid (teclados, claro).

¿Te gustó este artículo?
5
Comentarios
  • 1
  • 2
  • #1 por Mister Carrington el 23/09/2015
    Se me ocurre incluso una herramienta valiosa para la formación de muchos tipos: programación, música, audio, etc.
  • #2 por pablofcid el 23/09/2015
    Si, justo pensaba lo mismo. Ahora que los niños van a tener programación en los coles, seguro que este tipo de cosas motivan a muchos y les abren la cabeza en varios sentidos a la vez.
    De momento lo probé con Firefox y da la lata. Parece que con Chrome los que lo han probado han quedado con buen sabor (dentro de lo que es, claro).
  • #3 por Nikolay Tsenkov el 23/09/2015
    Hey everyone,

    I am the creator of the NV-1.

    First of all, thanks to Pablo for the article!

    I am available for any questions you guys might have.
    4
  • #4 por pablofcid el 23/09/2015
    Great to have you here! Cheers.
    This will certainly make me decide to install Chrome on my Mac.
    3
  • #5 por Nikolay Tsenkov el 23/09/2015
    Thanks!
    Haha, you really should. In fact, just yesterday I researched and successfully set the NV-1 for recording on Mac. That's another incentive to use a MIDI keyboard (install Chrome). ;)

    https://www.facebook.com/viktorsynth/posts/1476210616019671
    1
  • #6 por serxio el 23/09/2015
    I'm looking forward to try this on my phone using mi BeatStep :D
  • #7 por pablofcid el 23/09/2015
    #6
    Igual es mucho pedir para un teléfono. Entre la orientación de Android que no destaca por ayudar a las aplicaciones críticas en tiempo real, la poca memoria, la cantidad de procesos que está atendiendo por debajo, la ineficiencias de estos lenguajes de tan alto nivel... ya nos contarás. Yo prefiero ni intentarlo.
  • #8 por Nikolay Tsenkov el 23/09/2015
    I am experimenting with something on mobile, but it's too early to share.
    As the line goes "Stay tuned". ;)
    1
  • #9 por neomad el 23/09/2015
    Me voy a compRar un tecladito para la oficina !

    Tambien esta este que le mandé a Pablo en su día:


    https://chrome.google.com/webstore/detail/websid-commodore-64-synth/gegajffeckfifipchbbnibbgncjpcjio?hl=en
    1
  • #10 por Offset el 23/09/2015
    #8 Hi Nikolay,

    Nice to see your synth runs smoothly on Chromium (didn't test MIDI capabilities yet), also great masterclass of Javascript coding.

    I didn't have the time to dive real deep on your source code but what I've seen so far looks neat, and sounds even better... will someone lead me to install a web browser in my studio? Damnit :D

    Big thumbs up and thank you for your effort, keep it going! :ook:
    1
  • #11 por Nikolay Tsenkov el 23/09/2015
    Thanks Offset! You should check it out with a MIDI keyboard. I think you might be pleasantly surprised on how well does it play. My personal favourite - one of the monosynth patches: http://nicroto.github.io/viktor/?name=Cut%20through%20that%20Mix

    I really appreciate each and every comment and feedback and I am definitely fortunate and lucky to have so positive response so far.
    1
  • #12 por delmodulelove! el 23/09/2015
    Interesante artículo. gracias! Me interesaría cualquier tema relacionado con la programación y el sonido, existe hilo específico? Si no existe unificado, Se podría crear un hilo o tema especializado por favor?
  • #13 por Offset el 24/09/2015
    #11 Sure thing! I'm planning to test your synth in a no-internet-MIDI environment this weekend.

    Anyway, I have a previous question: Is there any way to pick the MIDI channel NV-1 will listen to or do I need to tweak something to make it listen to a specific channel?

    Thanks in advance.
  • #14 por Nikolay Tsenkov el 24/09/2015
    Hey Offset,

    I think it's currently listening to all channels.

    I am planning to add MIDI Mapping at some point and then I will start discriminating on channel.

    I think the channel data is trimmed here (I am zeroing the last 4 bits of the first byte of the MIDI message): https://github.com/nicroto/viktor-nv1-engine/blob/master/src/daw/engine/midi.js#L126
  • #15 por pablofcid el 24/09/2015
    #14 If you are zeroing those 4 bts (channel bits in status byte) you are certainly attending messages from all MIDI channels, with no distinction. Your synth is working in so called 'omni mode' due to that design currently applied.
    It is an easy mode for casual users, but certainly not the preferred for more serious setups.
  • #16 por pablofcid el 24/09/2015
    Hay también una rareza en las envolventes (que sucede también en algunos otros plugins, pero que no por eso es menos inadecuada):
    Con ataque=0 y sustain=0, da igual lo que se ajuste en decay la envolvente se queda siempre plana en zero, no llega a subir. Es necesario poner al menos ataque=1 para poder crear envolventes de pura rampa descendente, tan habituales.

    There is also an strange behaviour on ENVs. When set to attack=0, sustain=0, whatever the decay, the ENV doesn't move from zero, it keeps flat at zero level, without making the expected downward ramp contour. Only with at least attack=1 the conventional behaviour happens.

    I am curious about the origin of this fault, because I have seen it at other simple soft synths. Maybe you are all working using some kind of library for ENVs that has this unconventional design. Are you using your own ENV funtions or using those inside Web-Audio API?
  • #17 por pablofcid el 24/09/2015
    Also about the filter. Is your own design or just a call to the Web-Audio Filters API?

    Do you have some information on how coherent is the implementation of the ENVs, Filters, etc. behind the API at different web browsers? I mean that a call to an API is just an interface. The end result depends on the implementation of the functions at each browser or operating system. If the implementations differ, the same soft can sound completely different at each platform.
    Any information on that?
  • #18 por Nikolay Tsenkov el 24/09/2015
    Hey Pablo,

    Yes, well I haven't gotten to that serious setups, yet. As I said, this will come with MIDI mapping. It's useless to have channels if I don't have mapping.

    Envelopes are my design. They are different from traditional envelope generators with this - Attack:0 (in the [0, 100]) changes the starting point of the function, going from zero to Sustain level. While Attack:1, would raise instantly to 100% the value and would be the traditional way of change from there on.

    Filter is the default WebAudio BiquadFilter.

    I think for the major part (probably not entirely), Chromium and Safari share the same implementation of Web Audio, since Google forked Webkit in 2013.

    Firefox has a completely different implementation. IE is supposed to add their own implementation in Edge as well.

    As to how different they will be - I can't tell before I start working on support for other browsers. So far Chrome and Safari work fairly the same and sound, to my ear, is the same to marginally different. As a younger developer I used to always rant about how different browser renderings are and how they make our lives harder trying to support all of them, but what experience taught me is that alternatives bring competition and competition brings progress.
    Each and every implementation will make something right and will mess another, but the competition for being the best between them, gives us, the users, a guarantee for better tools at our disposal.

    So far FF is the only other browser I have spent any time trying to support, and they have a problem with parsing very small numbers, which breaks several things in Viktor. I definitely want to add FF support, and at some point I will, but right now, only Chrome support MIDI & Safari's Web Audio works out-of-the-box.
  • #19 por pablofcid el 24/09/2015
    I am happy to know about the ENVs and their peculiarities.

    The comparison with the different rendering of web pages at different browsers is a fair and clever one. It makes clear for anyone the limits of these new approaches where the core of some audio processes is not codified into stone on each product, but instead accessed from whatever implementation each OS / Browser happens to use (not necessarily the same).
    Even when the same Viktor NS-1 synth is used, it can sound and act differently when accessed from different platforms, OS, browsers, versions, etc.

    In spite of that there is plenty of posible uses. All ringtones also sound different from one phone to another, MIDI files are reproduces differently by each synth, etc. and they opened lots of new areas for all.
  • #20 por KikeAOR el 24/09/2015
    La verdad es que es de lo mejorcito, por no decir lo mejor, que he oído hasta la fecha en lo que a sintetizadores web se refiere.

    Hay sonidos muy interesantes y se pueden crear cosas de una calidad que uno no espera llegar a encontrarse en este tipo de entornos.

    Mi más sincera enhorabuena al autor.


    Gracias!!
    1
  • #21 por Offset el 24/09/2015
    #14 Thank you Nikolay, I'm gonna try to tweak that area of code because one of my interests is to layer several local instances of your synth running on several tabs on the same browser instance since the synth seems to be reasonably CPU-friendly.

    If the browser doesn't put to sleep non-focused (but active, receiving MIDI data) tabs I guess some interesting sounds can be obtained. Right now I don't know exactly how Chromium isolates tab processes but curiosity will kill my cat for sure.

    I know I could record several times the same sequence in omni mode and use several audio channels of the DAW to create the final sound but live layering can be a nice try, at least I'm gonna have some fun ;)
    1
  • #22 por delmodulelove! el 24/09/2015
    Lo que digo, necesario, si es posibñe, tratar estos temas de programación de síntesis virtuales en un foro aparte y especializado desde ya y más teniendo a grandes expertos como Nikolay. Muchas gracias!
  • #23 por Nikolay Tsenkov el 24/09/2015
    #21 Hey Offset,

    You should be able to do that. MIDI is passed to as many open tabs as you have if they handle it. :)

    You know what would be awesome - if you post about this, or record a video. Anyways, don't feel obligated to do that.

    Have fun!
  • #24 por Nikolay Tsenkov el 24/09/2015
    #20 in_flames1703 Thanks!

    I don't know more than a few words in Spanish, but either Google Translate is lying to me or you liked the synth. :)

    Cheers!
  • #25 por Nikolay Tsenkov el 24/09/2015
    #22

    Hye delmodulelove!,

    I apologize, but I couldn't make up too much of what the auto translate gave me. :(
  • 1
  • 2