MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

[BUILD] Magpie Dodeca / Dubldeca MIDI to Pulse/Gate/CV/.
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author [BUILD] Magpie Dodeca / Dubldeca MIDI to Pulse/Gate/CV/.
Neutron7
This will be for people building the 6 hp 12 output teensy based eurorack MIDI module.



Thiis module was built as a "quick and dirty" way to get 12 outputs from MIDI in a small module,

for CV it relies on very fast PWM (over 300khz) when the PWM is only using the 7 bits that MIDI CCs send, and filtering, you can also do triggers, velocity scaled triggers, gates, and velocity scaled gates.

with a bit of coding you could have built in self generated LFOs, envelopes, etc if you wanted say, octatrack style control LFOs and your sequencer does not have that feature,

there is one 12 bit DAC, using the built in teensy DAC output which can be used as a 1v/octave note output, but it is not meant as a high performance midi to 1v/octave midi voice. (probably ok for bass smile)

it might also be a nice start for learning teensy coding, as the sketches are fairly basic. (though you have a whole teensy to work with so...)

it has been found that you can also use this with usbMIDI, and Steven Noreyko has even gotten MIDI clock to work from USB. (we are updating the code for usbMIDI)
[note, USB MIDI will not pass from master to slave modules, it is using the raw midi pulses from the opto isolator, there might be a fairly easy fix for this though with just one wire kludge][/img]



here is the module page at magpie:

https://magpie-modular.myshopify.com/collections/pcb/products/dodecca- dubldeca-pcbs

here is the github with example code for 2c dodeca (dubldeca) made for octatrack.

https://github.com/MagpieModular/Dodeca

here are some other examples (not all fully working) I made while testing.

https://github.com/jakplugg/neutron-sound/tree/master/Neutron_magpie_d odeca_MIDI_OUT
nevetsokyeron
Quick notes:

The DUBLdeca uses 2 complete Dodeca units - this means two sets of everything under the hood (pcb + parts*) - with ONE Dubldeca panel.

This also means you need two euro power connectors. Or you can make a single power cable with two power connectors (pic below).

Not sure if the BOM is updated yet but try to get 5mm wide 47uF electrolytic caps. The early bom had 6.5 or something and they were kinda hard to squeeze in there. I ended up re-ordering and getting some of 667-ECA-1VM470I from Mouser

(*actually you only end up using ONE stereo jack for the MIDI input)

GaryInHuaHin
Could you explicate the wiring of the stereo jack for MIDI In? I think there's only 2 ways to do it, but I'd rather do it right the first time....

Initially having trouble compiling the code. It chokes whenever it hits a line to point to a handler, such as:

MIDI.setHandleNoteOn(HandleNoteOn);

It kicks back
'class MIDI_Class' has no member named 'setHandleNoteOn'

I'm using midi.h from PJRC. Is there something I should know?
Thanks!
nevetsokyeron
GaryInHuaHin wrote:
Could you explicate the wiring of the stereo jack for MIDI In? I think there's only 2 ways to do it, but I'd rather do it right the first time....


The side (ground) pin goes toward the 3rd hole in the pcb. BUT - you don't need to connect the ground pin.


GaryInHuaHin wrote:
Initially having trouble compiling the code. It chokes whenever it hits a line to point to a handler, such as:

MIDI.setHandleNoteOn(HandleNoteOn);

It kicks back
'class MIDI_Class' has no member named 'setHandleNoteOn'

I'm using midi.h from PJRC. Is there something I should know?
Thanks!


Check to see if you have a "MIDI" library folder in the Arduino Libraries folder (in your user directory ~/Arduino->Libraries). If so - take it out. The PJRC/teensyduino stuff is installed deep into the Ardunio application directory. Note - the "MIDI_Library" is OK and should not conflict.

There's some issues with a couple different versions of midi.h installed in different places.
GaryInHuaHin
nevetsokyeron wrote:
GaryInHuaHin wrote:
Could you explicate the wiring of the stereo jack for MIDI In? I think there's only 2 ways to do it, but I'd rather do it right the first time....


The side (ground) pin goes toward the 3rd hole in the pcb. BUT - you don't need to connect the ground pin.


Thanks. Actually, it's the external wiring I'm aftert, ie which pin of a 5-pin MIDI goes to the tip?

This might be standard now, but that hasn't always been the case. hmmm.....


nevetsokyeron wrote:
GaryInHuaHin wrote:
Initially having trouble compiling the code. It chokes whenever it hits a line to point to a handler, such as:

MIDI.setHandleNoteOn(HandleNoteOn);

It kicks back
'class MIDI_Class' has no member named 'setHandleNoteOn'

I'm using midi.h from PJRC. Is there something I should know?
Thanks!


Check to see if you have a "MIDI" library folder in the Arduino Libraries folder (in your user directory ~/Arduino->Libraries). If so - take it out. The PJRC/teensyduino stuff is installed deep into the Ardunio application directory. Note - the "MIDI_Library" is OK and should not conflict.

There's some issues with a couple different versions of midi.h installed in different places.


When I don't have that folder (PJRC's MIDI directory) in ~/Arduino->Libraries, I get ''MIDI' was not declared in this scope' error at MIDI.begin. This was my original problem.

Dueling midi.h's I suppose.... Fencing
nevetsokyeron
MIDI stereo jack is wired Arturia, Novation style:
4 - Tip
2 - Sleeve
5 - Ring



MIDI Libraries:
Get this one https://github.com/FortySevenEffects/arduino_midi_library
and then take out ~/Arduino->Libraries->MIDI

Which will leave you with ~/Arduino->Libraries->MIDI_Library instead.

On MacOS, the PJRC stuff is actually buried in the Arduino application bundle at Arduino.app->Contents->Java->hardware->teensy->avr->libraries->MIDI
GaryInHuaHin
Thanks for the explicit info on the MIDI connection. That does the job!

nevetsokyeron wrote:
MIDI Libraries:
Get this one https://github.com/FortySevenEffects/arduino_midi_library
and then take out ~/Arduino->Libraries->MIDI

Which will leave you with ~/Arduino->Libraries->MIDI_Library instead.

On MacOS, the PJRC stuff is actually buried in the Arduino application bundle at Arduino.app->Contents->Java->hardware->teensy->avr->libraries->MIDI


Still no joy on compilation. Oddly, I've moved from PC to Mac but have a similar result. error log below. The Libraries Manager shows 47Effects midi lib installed (which I assume is the one in Documents>Arduino>Libraries) but is seemingly ignored in favor of the PJRC library.

I've tried removing one library or the other. The error ('MIDI not declared in this scope') remains the same.

hmmm.....

Thanks again for help.

/dubldecca_left.ino.cpp.o"
dubldecca_left: In function 'void setup()':
dubldecca_left:66: error: 'MIDI' was not declared in this scope
MIDI.begin(MIDI_CHANNEL_OMNI);
^
dubldecca_left: In function 'void loop()':
dubldecca_left:81: error: 'MIDI' was not declared in this scope
MIDI.read();
^
Multiple libraries were found for "MIDI.h"
Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ MIDI
Not used: /Users/garyhall/Documents/Arduino/libraries/MIDI_Library
Using library MIDI at version 4.3.1 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ MIDI
'MIDI' was not declared in this scope
nevetsokyeron
Trying to test this on another computer from my existing Arduino install...

I did the following:
1) remove the MIDI folder from ~/Documents/Arduino/libraries/
2) use the Arduino application library manager to install the 47Effects midi library*
3) re-install teensyduino**

* this is at the menu path Sketch->Include Library->Manage Libraries...
and then search for MIDI

EDIT - there may be something going on here with versions of Arduino and Teensyduino. The above worked for me with Arduino 1.8.1 and Teensyduino 1.35

Right out of the box, Arduino 1.8.4 and Teensyduino 1.39 (both the current versions) end up with the compile error you experienced above. Something apparently changed with MIDI in Teensyduino 1.37 and later...

EDIT #2 (And FIX - if you have used Teensyduino 1.39)

add this code to your sketch just below #include <MIDI.h>

MIDI_CREATE_DEFAULT_INSTANCE();



For reference here's older versions:
https://www.pjrc.com/teensy/td_135/TeensyduinoInstall.dmg
https://www.arduino.cc/download_handler.php?f=/arduino-1.8.1-macosx.zi p

Also - for anyone else playing along in the home game - You must always quit and relaunch the Arduino application when you change anything with Libraries.
GaryInHuaHin
Yay! That did it! It's peanut butter jelly time! It's peanut butter jelly time!
Really glad we could recreate it and track it down.

Now to build.... smile w00t
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group