electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Arduino
KORG DW6000 hardware controller with Arduino nano
Post new topic   Reply to topic
Page 2 of 3 [55 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2, 3 Next
Author Message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Fri Aug 24, 2018 10:53 am    Post subject: Reply with quote  Mark this post and the followings unread

with rope & knots :-)
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Wed Aug 29, 2018 12:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

I finished it over the weekend Cool . I also added a DC output to the DW6000 with a diode and fuse in series as protection.
(will post the arduino sketch after cleaning it up a little bit)


KORG DW6000 controller - 09.jpg
 Description:
 Filesize:  291.03 KB
 Viewed:  575 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

KORG DW6000 controller - 09.jpg



KORG DW6000 controller - 10.jpg
 Description:
 Filesize:  291.4 KB
 Viewed:  597 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

KORG DW6000 controller - 10.jpg



KORG DW6000 controller - 11.jpg
 Description:
 Filesize:  219.56 KB
 Viewed:  538 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

KORG DW6000 controller - 11.jpg



KORG DW6000 controller - 12.jpg
 Description:
 Filesize:  249.67 KB
 Viewed:  569 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

KORG DW6000 controller - 12.jpg



KORG DW6000 controller - 13.jpg
 Description:
 Filesize:  201.44 KB
 Viewed:  543 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

KORG DW6000 controller - 13.jpg



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
robsol
Stream Operator


Joined: Apr 24, 2009
Posts: 2492
Location: Bristol UK
Audio files: 495

PostPosted: Wed Aug 29, 2018 5:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

That looks amazing, Phobos! afro
_________________
Muied Lumens Sub Forum
Bandcamp
Back to top
View user's profile Send private message
AlanP



Joined: Mar 11, 2014
Posts: 746
Location: New Zealand
Audio files: 41

PostPosted: Thu Aug 30, 2018 2:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Very, very, very tidy wiring.
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sat Sep 08, 2018 3:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

thanks guys Very Happy


Here's the schematic.
(note that I drew 32 controls but in reality it only uses 30 of them)


DW6000 controller.gif
 Description:
 Filesize:  202.4 KB
 Viewed:  607 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

DW6000 controller.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sun Sep 09, 2018 11:03 am    Post subject: Reply with quote  Mark this post and the followings unread

and here's the arduino sketch


DW6000finalV1.ino
 Description:
Arduino sketch for nano 3

Download
 Filename:  DW6000finalV1.ino
 Filesize:  67.94 KB
 Downloaded:  757 Time(s)


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
MusicMan11712



Joined: Aug 08, 2009
Posts: 1082
Location: Out scouting . . .

PostPosted: Sat Sep 15, 2018 5:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Looks pretty, straightforward, and quite functional. Congrats!!!
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sun Sep 16, 2018 7:34 am    Post subject: Reply with quote  Mark this post and the followings unread

MusicMan11712 wrote:
Looks pretty, straightforward, and quite functional. Congrats!!!


Thanks Steve Very Happy

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Tue Jan 08, 2019 4:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey PhoBosapiens!

what a great project ,

i'm DIY beginner, i know how to solder ( a bit) , would you give a run down
of what to buy ? Trimpots and Resistors and stuff, i have dw 6000 and this custom controller would give it new life .

i have a mega 2560 clone floating around the house, Very Happy

my schematic reading skills aren't that good, but who cares.


thanks for this project

cheers Kay
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Thu Jan 10, 2019 5:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

welcome party!

Quote:
i'm DIY beginner, i know how to solder ( a bit) , would you give a run down of what to buy ?
Trimpots and Resistors and stuff, i have dw 6000 and this custom controller would give it new life .

It depends a bit on how you want to make it. You don't need trimpots unless you want to use those instead of 'real' pots.
I only used them to do some tests. Do you want controls for everything or only some of the parameters ? Do you want CV inputs ?

Quote:
i have a mega 2560 clone floating around the house, Very Happy

if it is floating it might be posessed!
Let us pray clown

I don't know if my code would work right away on a mega and you'd probably have to make some adjustments for the pins
you want to use, although that is easy to do. Do you have any experience with writing your own code ?
I would suggest to first start with a very simple stripped down version, just an arduino with a couple of pots and a midi output
and try to get that working. Once you understand that it is much easier to expand it and maybe understand the code I wrote.
You need to install the midi library if you haven't already, I used this one: https://github.com/FortySevenEffects/arduino_midi_library/releases
For testing you can connect the midi output directly to the TX pin of the arduino with a 220 ohm resistor in series.
This video (and some others from the same channel) helped me a lot to get started https://www.youtube.com/watch?v=rmfAqg9O_os

Quote:
my schematic reading skills aren't that good, but who cares.

well, the schematic tells you what parts you need and how to connect them so it is rather essential to understand how to read it Wink
It's not very complex though, just has a lot of repetition. each paramater has a potentiometer and a protective network in case an
external CV is used and all the potentiometers are connected to multiplexers to expand the number of inputs on the arduino. There
are some switches (with LEDs), a midi input and a midi output and the LED displays which use shiftregisters to control each LED indvidually
with only 3 arduino pins. I used a 5V regulator for power but the onboard regulator on the arduino might be sufficient as the circuit
doesn't draw a lot of current.

Note that this is not really a beginners project. There is no kit with parts, no PCB just a schematic and some code (that you will probably
have to adjust a bit). So you will need some DIY experience to pull it of.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Fri Jan 11, 2019 6:43 am    Post subject: Reply with quote  Mark this post and the followings unread

Thank you for the quick response Phobo

HAHA yeah possessed it's telling me to work with it Twisted Evil

So, i'd like to copy your Controller, because iwanna do some DIY ish , finally!
And yeah CV patch action.

I just desoldered / soldered a new battery into the Dw6k! i'm brave enough for bigger tasks now. 😂i sure know it wont be easy for be , but im ready, try and error.

and the schematic, i'll learn and study it.

i'll get me the nano , just to grasp what is going on in the code of yours,
Will follow your suggestions and start with a lil set up and expand it

plus i have some friends who can help me in the process of building it

have you updated anything in the code since you finished the project
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sat Jan 12, 2019 4:45 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't think I made any changes to the code since I posted it. There is always room for improvements though. For example
the 4th DIP switch isn't assigned to anything yet. Also there are some presets in the code (* FACTORY PRESETS) but only
one of them is actually used on startup. I added a couple as it was useful for testing but it would be possible to make some
adjustments so more can be selected (maybe with a potentiometer). The code that has been posted should work though.

The parts of the code that are useful for testing are:
Code:
#define exclusive               0xF0
#define korg_id                 0x42
#define format_id               0x30
#define dw6000_id               0x04
#define param_change            0x41
#define eox                     0xF7


Code:
byte sysexArray[]             = {exclusive, korg_id, format_id, dw6000_id, param_change, param_offset, param_value, eox}; 


Code:
void SEND_SYSEX() {
  Serial.write(sysexArray, 8);
}


param_offset is a byte that selects the parameter you want to adjust (value can be found in the manual, or in the code)
param_value is a byte that sets the value you want that parameter to be.
note that there are some parameters which share the same offset value, for these the position of the bits in the parameter value determine
which parameter is set. For example VCA_env_release and OSC1_octave both have a parameter offset value of 19 but bits 0..4 set the
parameter value of the VCA_env_release while bits 5 and 6 set the value of OCS1_octave. (in the code I referred to these as shared bytes)

You could start with a simple code that adjusts 1 parameter. First by manually entering it and if that works try doing it with a potentiometer.
If everything is setup correctly then if you select that parameter on the DW-6000 you should see the value change on the display. You could
already do this with the mega.


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Mon Jan 14, 2019 5:13 am    Post subject: Reply with quote  Mark this post and the followings unread

Alright, it looks like i can start by the end of the week! Very Happy

therefore , i'll try to give you a liil heads up.

thanks a lot for the walkthrough
Back to top
View user's profile Send private message
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Tue Jan 22, 2019 6:30 am    Post subject: Reply with quote  Mark this post and the followings unread

i have a question how do i write a sysex string with shared bytes

fh F0,42,30,04,41,18 -vv Normal8Bit,s,0-7,1 -fh F7

this is the string for the Waveforms osc 1 & osc 2

but i want to use them seperately

it's in your code but i dont understand it
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Tue Jan 22, 2019 9:24 am    Post subject: Reply with quote  Mark this post and the followings unread

It's pretty much the same as all the other parameters except that both get updated at the same time, it's not possibel to only do one of them.
So if you want to change the value of OSC1_waveform you have to send it together with the current value of OSC2_waveform so that one
gets updated with the same value.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Tue Jan 22, 2019 9:39 am    Post subject: Reply with quote  Mark this post and the followings unread

okay kinda confusing

i thought i could control them separately ..

the code says OSC1_waveform [b5-b3] or OSC2_waveform [b2-b0]

#define OSC1_waveform_offset 24
#define OSC2_waveform_offset 24

which makes them 18 in hex
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Tue Jan 22, 2019 10:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Well they can be controlled seperately in the sense that they don't get changed by one control.
But you can't write values to them seperately. So when you want to update one of them you
always have to check what the value is of the other one, combine them into a single value and send that.

btw I mostly used binary values as that is how they are written in the manual and I also find it
easier to work with. If you are used to working with midi hex pobably makes more sense.

edit: so to change the waveform(s) you send:
F0,42,30,04,41,18,X,F7

where X is one number that has the values of both waveform 1 and waveform 2.
I think this is actuallly easier when done in binary. Hex is great when a byte is split in 2x 4-bits but in this case it is 2x 3-bits.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Tue Jan 22, 2019 3:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

thank you. i'll try that.

EDIT: OSC 2 Waveforms switch , OSC 1 doesn't
i leave it there at the moment
Back to top
View user's profile Send private message
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Thu Jul 04, 2019 3:47 am    Post subject: MSB - LSB Reply with quote  Mark this post and the followings unread

hey there,

how do i convert the msb - Lsb

into binary numbers?

somehow i can't find list of binaries for the paramaters in your code,
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Thu Jul 04, 2019 5:21 pm    Post subject: Re: MSB - LSB Reply with quote  Mark this post and the followings unread

I am not exactly sure what you're looking for but let's see if this helps.
The values for every parameter are stored in the array "param_values[]". In this array the values are all stored seperate, for example:
OSC1_waveform is stored at param_values[1] and OSC2_waveform is stored at param_values[4].
Initially this array is fillled with values from a (factory) preset by the 'FACTORY PATCH LOADER' but when one of the controls is changed (knob is turned)
it will use its value.

First the new value is read by 'READ CONTROLS', the arduino has a 10bit ADC and the maximum bit length needed is only 6bit (cutoff) so initially the
values are converted to 6bit. (this also makes it possible to store values in a single byte)
Code:

ctrl_val_read[CTRL] = analogRead(ana_1) >> 4;                       // read analog value from parameter control, convert to 6 bits (0..63) and store
ctrl_val_read[CTRL] = analogRead(ana_2) >> 4;                       // read analog value from parameter control, convert to 6 bits (0..63) and store


After reading the 'PARAMETER CONVERTER' is used to adjust and store the values in param_values[]. First the bit length gets adjusted
(except for cutoff which needs 6bits) and after that it is shifted if needed (for shared bytes) and finally stored.
Code:

switch (param_id) {
..
    case OSC1_waveform:                                 // OSC1_waveform:   b5-b3   (0..7)
      ctrl_value = ctrl_value / 8;                      // convert 6 bit value to 3 bits
      ctrl_value = ctrl_value << 3;                     // shift value to correct position
      break;
    case  OSC2_waveform:                                // OSC2_waveform:   b2-b0   (0..7)
      ctrl_value = ctrl_value / 8;                      // convert 6 bit value to 3 bits
      break;
..
}
param_values[param_id] = ctrl_value;                  // store new parameter value


The 'PARAMETER_MERGER' is used to create the actual byte value that is send to to the DW6000 which can either be a single value from param_values[]
or 2 values merged together (logic OR).
Code:

    case OSC1_waveform:                                 //  1. OSC1_waveform:   b5-b3
    case OSC2_waveform:                                 //  4. OSC2_waveform:   b2-b0
      merged_value = (param_values[OSC1_waveform] | param_values[OSC2_waveform]);
      break;

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Fri Jul 05, 2019 5:32 am    Post subject: Reply with quote  Mark this post and the followings unread

i'm talking about this...


msblsb.png
 Description:
 Filesize:  462.72 KB
 Viewed:  204 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

msblsb.png


Back to top
View user's profile Send private message
panthera86



Joined: Jan 08, 2019
Posts: 9
Location: Zamunda

PostPosted: Fri Jul 05, 2019 5:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Phobos!thanks for the explanation of the code,
that will help me understand what is going on in the code
Back to top
View user's profile Send private message
kriaction



Joined: Nov 27, 2017
Posts: 2
Location: italy

PostPosted: Thu Aug 08, 2019 6:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi PHOBoS, I plan to use the same Digitast switches in my project, mine are the narrow model (the only cap measures (12.3x17.1)mm).

In your panel design how much bigger is the cut-out with respect to the button itself? I was going for (12.3x17.5)mm (dimensions of the hole button) but I am worried that the switch might get stuck when pressed, and I have not so much space on my panel.

PS. Congrats for the final result, quite an impressive project Very Happy


Cattura.PNG
 Description:
These are the measures I am talking about
 Filesize:  107.83 KB
 Viewed:  182 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Cattura.PNG


Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Thu Aug 08, 2019 7:35 am    Post subject: Reply with quote  Mark this post and the followings unread

welcome party!
and thanks Very Happy

I just measured it and the switches are the same size. I can't measure it exactly and there is some play since i cut the holes myself
but it looks to be 13.0 x 18.0. Keep in mind that you need more space at the bottom of the switch than at the top. You actually don't
even need any extra space at the top, but I think it looks better. So I'd say about 0.3mm on the sides + the top and 0.5 at the bottom.

If you are planning to have the panel fabricated then keep tolerances in mind, it should be mentioned somewhere. It's probably not
very much but it's better to have the cutout a bit too large than just too small.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kriaction



Joined: Nov 27, 2017
Posts: 2
Location: italy

PostPosted: Thu Aug 08, 2019 7:56 am    Post subject: Reply with quote  Mark this post and the followings unread

Thank you very much Very Happy

They seem to be very precise cuts, I was assuming you had the panel made professionally.
I am designing it as a pcb with inkscape and a tool called svg2shenzhen. I found a company that make aluminum panels and even 1 piece at a time. Maybe in the future I'll open a new topic with all the infos and results.

I'm always lurking, I haven't even noticed that it's my first post Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic
Page 2 of 3 [55 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Arduino
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use