Offline
France

ok, so the additions I made to the synthy's code were not substantial, only the "DefaultIntrument.h" definitions which include some default values to fill the board. With this addition, it works on my genuine Uno, otherwise it doesn't. That's quite strange because without this addition, it works on my arduino clones.
The code I use doesn't include the original midi.h but the default one from the arduino.cc website. Yet, it works this way for me.

I've posted the code there:
https://bitbucket.org/farvardin/ym2151_ … shield/src

In the Midi_In_YM2151_set_opm folder. I'll post the rest later.

Offline
brooklyn, NY

I just built this out on breadboard using a pro mini and can confirm that  both garvalf's edit and masl's midi version work w/ non-uno hardware.   The orignal sketch by Yukio Ishii would not compile. 

still havent figured out how to change the sound or load different patches.   the midi version doesnt seem to reposnd to any cc messages i send.  Can it have multiple presets?   doesnt respond   to program changes

this is an awesome project and hope to see it grow into a 'proper' synth : pitchbend, velocity, aftertouch, etc

Great work.

Last edited by Charbot (Jun 10, 2016 8:11 pm)

Offline

Hi,
I will soon release my code, with CC messages, loading of VOPM Patches and so on. Sadly saving of patches on the device itself will most certainly not be included yet. But you can use the PC tool I created, to save/load the patches on PC. (there is a Midi through option available in the Tool, so you can use the DAW or other Midi devices, to create your music, while altering the sound)

Offline
France

Very cool to know that, i'm impatient to use it!

Offline

HI,
finally I'm done.
You can find the Controller Software for PC at: https://github.com/masl123/YM2151-Midi- … r/releases
and the Code for Arduino at: https://github.com/masl123/YM2151-Arduino-Software

Let me know if you find any Bugs.

If the Synchronisation between the Arduino and the PC Software is messed up, click on MIDI->Sync Instruments. You should also do this after starting the Software (don't forget to select a Midi Output first), Setting the Poly Mode or Changing the Mapping. (I Should automate this)

Features are:
- Loading/Saving of OPM FIles
- Loading and Saving of Patch Files (include the Mapping between Instruments and Channels)
- Midi Through, so you can use LoopMidi and a DAW of your Choice
- PolyMode/Channels Mode
- ...
- Any Bugs you find xD

-- masl

Offline
France

Thank you. I've tried the arduino code, and it seems to play fine. For the java application, it works for me, but I have a problem for using it with my soft keyboard (vmpk), when vmpk is on, the java controller can't use midi, and when the java controller is on, vmpk can't use the midi channel, so I can't even make a sound without external midi control. Maybe it's a problem in my configuration or a compatibility issue with Linux, so I'll test it further...

Last edited by garvalf (Aug 13, 2016 7:56 am)

Offline

Hi,
you need a tool to create a Virtual Midi Port. For Windows it would be loopMidi or loopbe1. For Linux, I did a quick Google and found this: http://tldp.org/HOWTO/MIDI-HOWTO-10.html  After Creating the port, you Connect your soft Keyboard, or a DAW to it and Set the Input in the Java app to that Port. Now you can use both. Btw, it is wanted behaviour from the Midi drivers to let you only connect from one device. This also does not work on Windows.
-- masl

Last edited by masl (Aug 13, 2016 9:10 am)

Offline
France

hey, thanks. I simply did "sudo modprobe snd-virmidi" and now I have my virtual ports. Then as you said I connected the java app, my virtual keyboard and musescore (midi player / composer) to the virtual in. And the virtual out to my midi port, connected to the ym2151. It works fine.

Offline
brooklyn, NY

This is so rad.  Great work.    Mine works great, tho i do have some trouble switching between patches.    First one loads fine, but then it seems to get stuck on that one and doesnt want to load new instruments.  Ive just been manually resetting the arduino everytime i try a new sound.    pretty good chance that this is user error.

Last edited by Charbot (Aug 25, 2016 8:49 pm)

Offline
France

I had something similar. What worked for me was to remove the current instrument and load a new one. Sometimes the editor got stuck and then I had to start it again. But otherwise it's very fine. I haven't tried to play several instruments together but I intend to do it.

Offline
brooklyn, NY

Cool- ill try that.

Last edited by Charbot (Aug 25, 2016 11:45 pm)

Offline
France

I've tried to mix a recording from the ym2151 shield with other music sources, and it seems the tonality is about 1 tone above the rest, that's funny.

Offline
brooklyn, NY

double post

Last edited by Charbot (Aug 30, 2016 7:23 pm)

Offline
brooklyn, NY

I just designed a layout for a one-board DIY version of this project... Tested and verified:   https://github.com/miotislucifugis/Yama … DIY-Synth-


It is single-sided- perfect for home etching.  ( only has 7 jumpers!)     Uses a Arduino Pro Mini.   I hate shields.   
The parts are so cheap and easy to find on ebay.   All the chips including the arduino should be about $15.     

Last edited by Charbot (Aug 30, 2016 7:40 pm)

Offline
France

that's very cool!
I might consider making a new one this way.

By home etching, I think you're talking about something like this: https://www.youtube.com/watch?v=wKEe3otWstM
In the case we can make some industrial PCB, could you consider uploading the original design sketch ?

Offline
brooklyn, NY

Yeah,   used a laser printer to print the layout onto glossy 'presentation' paper.     then after prepping the blank copper-clad board  (light sand w/ very fine grit and clean w/ alcohol),   put the layout face down and iron the shit out of it on high.   The toner will 'melt' and restick to the copper.    after it cools, the paper should peel off, fairly easily and  be  ready to etch.    Its not real hard but this may be tricky one for a first timer.    Also you need a sub 1mm drill bit.
       id be happy to post the eagle files.   i was thinking about have a few made professionally anyway.   The more users the better.

I found a pro micro and Im going to mess around to see if i can get that to work.   could open the window for usb midi.

BTW- masl,   something is up w/ the sketch in the newest arduino ide  1.6.9-11.   cant compile any more (w/ any board) getting this error:
( It does work on old versions of arduino - 1.0.6    ) 


In file included from /Users/charleshobbs/Library/Arduino15/packages/arduino/hardware/avr/1.6.13/variants/eightanaloginputs/pins_arduino.h:23:0,
                 from /Users/charleshobbs/Library/Arduino15/packages/arduino/hardware/avr/1.6.13/cores/arduino/arduino.h:249,
                 from sketch/CCHandler.h:23,
                 from sketch/CCHandler.cpp:109:
/Users/charleshobbs/Library/Arduino15/packages/arduino/hardware/avr/1.6.13/variants/eightanaloginputs/../standard/pins_arduino.h:56:19: error: expected unqualified-id before numeric constant
#define PIN_A0   (14)
                   ^
sketch/YM2151.h:34:25: note: in expansion of macro 'PIN_A0'
   static const uint8_t  PIN_A0=12;
                         ^
/Users/charleshobbs/Library/Arduino15/packages/arduino/hardware/avr/1.6.13/variants/eightanaloginputs/../standard/pins_arduino.h:56:19: error: expected ')' before numeric constant
#define PIN_A0   (14)
                   ^
sketch/YM2151.h:34:25: note: in expansion of macro 'PIN_A0'
   static const uint8_t  PIN_A0=12;
                         ^
exit status 1
Error compiling for board Arduino Pro or Pro Mini.


**** UPDATE*****    figured this out.    It is some issue with the new board packages.   I rolled back to AVR Boards 1.6.11 and all seems good.

Last edited by Charbot (Sep 4, 2016 2:04 pm)