Addon MIDI para ZX-UNO

Proyectos ajenos al equipo oficial pero desarrollados o promovidos por la comunidad, relacionados con el ZX-UNO / Projects outside the official team but developed or promoted by the community, related to the ZX-UNO
Avatar de Usuario
mcleod_ideafix
Mensajes: 831
Registrado: 27 Sep 2015, 00:14
Ubicación: Jerez de la Frontera
Contactar:

Addon MIDI para ZX-UNO

Mensaje por mcleod_ideafix » 01 Ago 2019, 15:43

Second batch: 18 units!! SOLD!

PEOPLE INTERESTED:

Código: Seleccionar todo

WHO                                 HOW MANY   STATUS
-------------------------------------------------------------------
Pendientes de la tirada anterior       5       Ordered, paid, sent
Nestor (Telegram)                      1       Ordered, paid, sent
Antonio Silva (Telegram)               1       Ordered, paid, sent
Kristatos @ricoperez (Telegram)        1       Ordered, paid
Fons (Telegram)                        2       Uno de ellos con pinchos largos. Ordered, paid, sent
Alexandre Colella (Facebook)           1       Ordered, paid, sent
Carles Oriol (Facebook)                1       Ordered, paid, sent
Jordi Bayó                             1       Ordered, paid, sent
Daniel Nagy (Facebook)                 2       Ordered, paid, sent
Agustín (Telegram)                     1       Ordered, paid, sent
Konstantin Kalataj                     1       Ordered, paid (conector hembra), sent
Carlos A. Paramio                      1       Ordered, paid, sent
Price for one MIDI module: 18 euros

Shipping fees:
- Envío a España, carta ordinaria: 1.5 euros
- Envío a España, carta certificada: 4.5 euros
- International delivery, registered / envío internacional, certificado: 6 euros

Payment (this has changed, to ease the process!!)
Elige tu opción (addon MIDI y envío por correo ordinario o certificado) y pulsa en "Comprar ahora". Creo que funciona incluso si no tienes cuenta de PayPal, en cuyo caso te deja pagar con tarjeta de crédito.

Choose your option (addon MIDI + registered delivery and click on "Buy it now -Comprar ahora-"). I think it works even if you don't have a PayPal account, allowing you to pay through credit card.

The selling process will be aborted if I run out of MIDI addons. Take into account that the list at the top of this post doesn't get updated automatically with each sale.

PAYMENT LINK DELETED. ALL ITEMS SOLD.

If in doubt, please contact me (Telegram, Whatsapp, or PM in this forum)

Desde hace ya tiempo que tenía ganas de meterle mano al MIDI, pero el chip que había encontrado, el SAM9773 (nada que ver con el SAM Coupé) no se encontraba por ningún sitio, hasta que hace cosa de un mes lo encontré, así que me dije que por qué no? Y después de diseñar la plaquita, buscar componentes, etc, presento este addon.
placa_midi.png
2019-07-30 18.39.22.jpg
Funcionalmente muy sencillo, pero con un chip que encierra un potencial de sonido enorme: 15 canales + percusión. Polifonía de 38 voces. ROM de instrumentos interna de 4 Mbits. Salida digital I2S, lo que me permite rutarla de nuevo al interior del core para mezclarla con el resto de fuentes de sonido y que todo salga por el mismo sitio, sin necesidad ni de usar un DAC I2S aparte (aunque sonaría mejor, claro está), ni de usar conectores audio aparte.
features_sam9773.png
La gracia del asunto es que el BASIC de 128K del Spectrum soporta MIDI de forma nativa en el comando PLAY. Lo explico en uno de los videos. Todo lo que hacía falta era "sacar afuera" el pin del AY-3-8912 que saca la señal MIDI y enviársela a este chip. Una vez hecho todo esto, desde el ZX-UNO configurado como un +2e puedo usar el comando PLAY y cargar y salvar programas en la tarjeta SD configurada como unidad +3e.

Lo primero que probé fue el ejemplo que viene en el propio manual del Spectrum, al cual le he agregado comandos MIDI ad-hoc para asignar instrumentos a canales, para que suene más natural.

phpBB [media]


En este otro video se muestra la paleta de sonidos: los 128 instrumentos más el set de percusión y efectos:

phpBB [media]


Rrecordad que todo esto es desde el BASIC estándar del 128K, con el comando PLAY. O sea, que no nos hemos inventado nada nuevo. Esto es algo que el Spectrum ha podido hacer desde que es 128K, pero pocos habían podido disfrutarlo.

¿Planes? Bueno, esto no es un addon oficial, pero en el código fuente estará el soporte para él, para quien lo quiera poner. Digamos que mientras no moleste, lo tendré en el core (mi principal meta ahora mismo es integrar en el core oficial el soporte de la UART para la wifi). Si ahora o en un futuro, al añadir cosas al core oficial, algo tiene que salir, pues será el soporte de MIDI el que salga. Espero que no tenga que llegar a eso, porque la verdad es que suena un montón de bien, aunque no haya prácticamente nada de software (salvo el que uno haga con BASIC y el comando PLAY) que lo use. De hecho, el único programa que conozco que hace uso intensivo de PLAY, el recopilatorio de Neil Parsons "8 Bit Bach" ya lo he adaptado para que suene a través de MIDI con los instrumentos asignados a cada canal según la pieza que suena. Video aquí:

phpBB [media]


Y por último, una demo de cómo reproduce ficheros MIDI desde ESXDOS (no hace falta tener el BASIC del 128K activo, pero sí tener al menos un chip AY habilitado)
phpBB [media]


¿Haré una tirada para interesados? Sí, si tengo a al menos 12 interesados.
¿Precio? 18 euros + gastos de envío.
¿Funcionaría esto en un 128K estándar? Sí, aunque al tener este chip salida digital I2S, haría falta un DAC que no se necesita para el ZX-UNO (la FPGA decodifica I2S). Para un 128K estándar tengo otra idea basado en un chip de la misma familia, el SAM2695, que no necesita DAC. Estaba pensando en este caso en un addon interno, una plaquita para soldar dentro de la placa de un 128K / +2 / +3, con 4 puntos de soldadura: VCC, GND, MIDI IN, AUDIO OUT. No se necesita más nada.
Me da palo abrir mi Spectrum y ponerme a soldar. ¿No existe algo externo? Sí, se podría hacer completamente externo, pero saldría más caro porque tendría que añadir la lógica para implementar un cachito del AY-3-8912 en una CPLD, para tener disponible la señal de MIDI OUT. Por otra parte la ventaja es que funcionaría incluso en un 48K, o un clon de 128K que no tuviera el conector "raro" de MIDI que se usaba en el modelo original. Si hay demanda, me lo planteo.
http://www.zxuno.com
ZX-Uno · Clon de ordenador ZX Spectrum basado en FPGA

Avatar de Usuario
mcleod_ideafix
Mensajes: 831
Registrado: 27 Sep 2015, 00:14
Ubicación: Jerez de la Frontera
Contactar:

Re: Addon MIDI para ZX-UNO

Mensaje por mcleod_ideafix » 01 Ago 2019, 15:44

PS: el pequeño chip con forma de transistor y que no está soldado en el prototipo, el DS2431, será objeto de un post aparte ;) No es necesario para que el addon MIDI funcione, eso sí.
http://www.zxuno.com
ZX-Uno · Clon de ordenador ZX Spectrum basado en FPGA

nihirash
Mensajes: 110
Registrado: 04 May 2019, 00:55
Contactar:

Re: Addon MIDI para ZX-UNO

Mensaje por nihirash » 01 Ago 2019, 16:56

Looks very good :-)

I'll be glad to have same thing!

How much cpu required to send MIDI commands?
Do it acceptable for background work on interupts?
My hardware:
ZX Uno 4.2, +UNO, ZX-Evolution Rev. C+VDac+ZXM-SoundCard Extreme+ZiFi, Harlequin 128K, Reverse U8, Leningrad 48K

My blog(and there gopher server on 70th port): https://nihirash.net/

Avatar de Usuario
mcleod_ideafix
Mensajes: 831
Registrado: 27 Sep 2015, 00:14
Ubicación: Jerez de la Frontera
Contactar:

Re: Addon MIDI para ZX-UNO

Mensaje por mcleod_ideafix » 01 Ago 2019, 17:09

nihirash escribió:Looks very good :-)

I'll be glad to have same thing!

How much cpu required to send MIDI commands?
Do it acceptable for background work on interupts?
Not much I believe, but the UART MIDI implementation that the Spectrum provides is a bit banging approach, so interrupts should be disabled while a byte is being transfered. As the protocol uses a 31250 baud speed, that means that to transmit a byte you need absolute control of the CPU for about 320 microseconds (a byte needs 1 bit start, 8 bits for the data itself, plus 1 bit stop).
http://www.personal.kent.edu/~sbirch/Mu ... _layer.htm
http://www.zxuno.com
ZX-Uno · Clon de ordenador ZX Spectrum basado en FPGA

nch
Mensajes: 77
Registrado: 10 Ene 2018, 23:16

Re: Addon MIDI para ZX-UNO

Mensaje por nch » 02 Ago 2019, 08:49

Que bueno, no me esperaba algo así a estas alturas. Muchas gracias mcleod.
Si al final haces una tirada para interesados, apúntame dos, por favor.

PiyoTaro
Mensajes: 12
Registrado: 27 Sep 2018, 21:18

Re: Addon MIDI para ZX-UNO

Mensaje por PiyoTaro » 03 Ago 2019, 10:01

mcleod_ideafix escribió:
phpBB [media]

phpBB [media]
A demonstration video that you can play music with the "PLAY" statement in ZX128 BASIC.
In "ZXUno", the parallel interface of AY is connected to the expansion connector, so it is interesting.

The "ZX-Uno" expansion connector has an I2S audio input and an AY parallel interface.
If you can get a "connector" for a ten-key interface, it may be announced as a "MIDI/ten-key keyboard Interface board" without a sound chip.

--
About the sound chip ATSAM series of dream company.

The current product "SAM2695" has an 8-bit I/O port(D0-7,A0,/CS /WR /RD,IRQ) named "Parallel MIDI interface" and can be connected to the CPU bus like a Yamaha sound chip.

It is a different topic from "using the MIDI function of ZX128 BASIC ROM" and "implementing UART", but it is a postscript.

I am thinking of something similar. I am connecting the "Adafruit Music Maker MP3 Shield" to the UART port(Wifi-module connector) of ZXSpectrumNext and trying to use the stand-alone MIDI mode of the "VS1053b" chip. (This chip is inexpensive and QFP package, so I think it is easy to make a board.)

kgmcneil
Mensajes: 81
Registrado: 29 Ago 2016, 08:48

Re: Addon MIDI para ZX-UNO

Mensaje por kgmcneil » 04 Ago 2019, 07:55

Would it be complicated to adapt something like this to use a ZX bus slot for something like a pentagon, or ZX Evo computer?...

Avatar de Usuario
mcleod_ideafix
Mensajes: 831
Registrado: 27 Sep 2015, 00:14
Ubicación: Jerez de la Frontera
Contactar:

Re: Addon MIDI para ZX-UNO

Mensaje por mcleod_ideafix » 06 Ago 2019, 15:18

kgmcneil escribió:Would it be complicated to adapt something like this to use a ZX bus slot for something like a pentagon, or ZX Evo computer?...
With the current chip I'm using, a bit, because you would need a separate DAC I2S. For discrete logic machines, I think it's better to use another version of this synthesizer chip with does analog output. OTOH, if the MIDI OUT signal is not present in the expansion bus, a small CPLD implementing a bit of the AY chip, just enough to have a MIDI OUT signal is needed as well.
A cheaper option would be to design a small internal PCB which connects directly to IO2 at AY-3-8912 and outputs to some point in which it is mixed with the rest of audio sources. Such PCB would have 4 solder points: +5V, GND, MIDI OUT from AY, AUDIO OUT to audio mixer.
http://www.zxuno.com
ZX-Uno · Clon de ordenador ZX Spectrum basado en FPGA

kgmcneil
Mensajes: 81
Registrado: 29 Ago 2016, 08:48

Re: Addon MIDI para ZX-UNO

Mensaje por kgmcneil » 10 Ago 2019, 05:01

Thanks mcleod... sounds complicated, and maybe something that would have to be custom built rather than something generic that can simply be fixed up...

As far as the Uno is concerned, would an addon like this be possible with some sort of through-port connector to add the extra memory on top, or would it compete with existing memory expansion addons already out there?...

I think its great that even at this stage, people are still actively developing hardware for the ZX machine...

Also, am I right in thinking that this addon would work with the modified PLAY command, designed for 6 channel playback, or only with the original one from the 128k ROM?...

Regards,

:plasplas:

Avatar de Usuario
mcleod_ideafix
Mensajes: 831
Registrado: 27 Sep 2015, 00:14
Ubicación: Jerez de la Frontera
Contactar:

Re: Addon MIDI para ZX-UNO

Mensaje por mcleod_ideafix » 12 Ago 2019, 00:09

kgmcneil escribió:would an addon like this be possible with some sort of through-port connector to add the extra memory on top, or would it compete with existing memory expansion addons already out there?...
Memory addons use all the available signals so there would be collissions.
kgmcneil escribió:Also, am I right in thinking that this addon would work with the modified PLAY command, designed for 6 channel playback, or only with the original one from the 128k ROM?...
I haven't tried with the modified PLAY command. I only have tried it with the original 128K BASIC PLAY command. The .playmid utility I have just written works regardless of the system ROM in use, as long as there is at least an AY chip enabled.
http://www.zxuno.com
ZX-Uno · Clon de ordenador ZX Spectrum basado en FPGA

Responder