Writing a JSynthLib driver
Moderators: MattKingUSA, khz
Writing a JSynthLib driver
Recently, I started checking out if it would be possible to write a driver for my Roland SPD-11e-drumpads and decided to try doing it for JSynthLib. If someone here could give me some general starting advice for such a programming project, i 'd appreciate it 'cause I've got close to no experience writing a Java class.
Because I probably have to ask advice on many places, I'll keep my overview on this wiki and use this thread here to share my experiences in general.
Some links:
JSynthLib Programming Guide
Eddie's Roland SysEx tutorial
spd-11.wikispaces.com
Roland SPD11 manual (SysEx info starts at page 79)
thanks in advance
Because I probably have to ask advice on many places, I'll keep my overview on this wiki and use this thread here to share my experiences in general.
Some links:
JSynthLib Programming Guide
Eddie's Roland SysEx tutorial
spd-11.wikispaces.com
Roland SPD11 manual (SysEx info starts at page 79)
thanks in advance
Re: Writing a JSynthLib driver
That depends on the quality of the MIDI Implementation and manual of the synth you're trying to write it for.
With JSynthLib, I have the impression, once you wrote one driver, it's easy to write another one.
The hardest part is to understand how JSynthLib works with a driver.
Some other things you have to know about are Java, hexadecimal to decimal calculation and the specification of your synth and it's SysEx rules. I wouldn't call it really difficult in general.
Any synth has some sort of banks and patches database in its memory. Understanding the structure of that memory (the "address map") is important to understand the composition of the sysex messages. Reading the SPD-11's MIDI implementaion learns me a lot about this. When I do a sysex dump to kmidimon, I can understand what every number in the sysex message means. I still have to look it up in tables, but I understand them.
You can also use the source of an already made driver for your new driver, and adjust it to follow the specifications of your synth. And the JSynthLib Programmer's Guide is pretty well written.
Just give it a go, it's done before your pizza is ready
With JSynthLib, I have the impression, once you wrote one driver, it's easy to write another one.
The hardest part is to understand how JSynthLib works with a driver.
Some other things you have to know about are Java, hexadecimal to decimal calculation and the specification of your synth and it's SysEx rules. I wouldn't call it really difficult in general.
Any synth has some sort of banks and patches database in its memory. Understanding the structure of that memory (the "address map") is important to understand the composition of the sysex messages. Reading the SPD-11's MIDI implementaion learns me a lot about this. When I do a sysex dump to kmidimon, I can understand what every number in the sysex message means. I still have to look it up in tables, but I understand them.
You can also use the source of an already made driver for your new driver, and adjust it to follow the specifications of your synth. And the JSynthLib Programmer's Guide is pretty well written.
Just give it a go, it's done before your pizza is ready
Last edited by freqrush on Wed Jan 07, 2009 5:42 pm, edited 1 time in total.
Re: Writing a JSynthLib driver
A question i'm stuck with at the moment is:
If I want to save the settings of a single pad, and add it to another drumkit, what will I have to design ?
1. a panel / driver to edit/save/load a single pad (a sound with certain delay, level, pitch etc) ?
2. + a panel / driver to edit/save/load a single patch (1 drumkit) ?
3. + a panel / driver to edit/save/load a Bank of 64 patches ?
Maybe I can use the Scene Window in JSynthLib to compose drumkits or banks of drumkits. In that case I only have to write nr 1.
A basic road map to follow could be:
>> 1. Make a conceptual design of the driver's GUI
With this I mean, look at the parameters in the synth you will be able to change through MIDI/SysEx messages, and think about how the different parameters belong together in subgroups.
>> 2. Write the different drivers together with some testing GUI elements.
>> 3. Test everything
>> 5. Finish the GUI
If I want to save the settings of a single pad, and add it to another drumkit, what will I have to design ?
1. a panel / driver to edit/save/load a single pad (a sound with certain delay, level, pitch etc) ?
2. + a panel / driver to edit/save/load a single patch (1 drumkit) ?
3. + a panel / driver to edit/save/load a Bank of 64 patches ?
Maybe I can use the Scene Window in JSynthLib to compose drumkits or banks of drumkits. In that case I only have to write nr 1.
A basic road map to follow could be:
>> 1. Make a conceptual design of the driver's GUI
With this I mean, look at the parameters in the synth you will be able to change through MIDI/SysEx messages, and think about how the different parameters belong together in subgroups.
>> 2. Write the different drivers together with some testing GUI elements.
>> 3. Test everything
>> 5. Finish the GUI
Re: Writing a JSynthLib driver
Because writing a driver is actually pretty hard when you're no experienced java developer, I've teamed up with another JSynthLib newbie and we're trying to build a more informative and guiding wiki for ourselves and future newbies.
If people here have time on their hands and want to help us, please be welcome to join.
Writing a Universal SysEx Librarian that can edit any synth is a lot of work so this team can use
many helping hands.
In case you have a suggestion but don't want to join wikispaces, I'm keeping track of this topic so you can leave any message here too .
If people here have time on their hands and want to help us, please be welcome to join.
Writing a Universal SysEx Librarian that can edit any synth is a lot of work so this team can use
many helping hands.
In case you have a suggestion but don't want to join wikispaces, I'm keeping track of this topic so you can leave any message here too .
Re: Writing a JSynthLib driver
I've finished the library support, so now I can request and dump any info from and to the SPD11 .
This added some extra functionality to the SPD11: now I can copy one drumpad's settings to another pad, from another drumkit. Or I can copy the effects settings from one drumkit to another drumkit.
The SPD11 has a copy function, but that one only copies a whole drumkit.
Currently I'm working on the editor parts. I started with an editor for a single drumpad, and now I can see the drumpad's settings visualized like in a mixer's channel strip. Very motivating to get the "Send" method working, so I can use these knobs with my midi controller and change the sound. (also nice that I discovered the modprobe snd-virmidi command)
The list is getting active again, and we've got 3 users in the facebook group, yay !
This added some extra functionality to the SPD11: now I can copy one drumpad's settings to another pad, from another drumkit. Or I can copy the effects settings from one drumkit to another drumkit.
The SPD11 has a copy function, but that one only copies a whole drumkit.
Currently I'm working on the editor parts. I started with an editor for a single drumpad, and now I can see the drumpad's settings visualized like in a mixer's channel strip. Very motivating to get the "Send" method working, so I can use these knobs with my midi controller and change the sound. (also nice that I discovered the modprobe snd-virmidi command)
The list is getting active again, and we've got 3 users in the facebook group, yay !
Re: Writing a JSynthLib driver
Once you get the inner workings of JSynthLib, it's pretty exciting to develop an editor for a hardware synth.
This morning I checked out the workings of how a sysexmessage is sent to the synth when a controller in JSynthLib is moved. Then discovered a mistake in my calculateChecksum method and now I've got most parameters of a pad under my control. That really gave me a "yay!" feeling
Now I have to find out how to change two bytes at once, for the nibbled data, so I can choose the sound for a pad from the list of names.
This morning I checked out the workings of how a sysexmessage is sent to the synth when a controller in JSynthLib is moved. Then discovered a mistake in my calculateChecksum method and now I've got most parameters of a pad under my control. That really gave me a "yay!" feeling
Now I have to find out how to change two bytes at once, for the nibbled data, so I can choose the sound for a pad from the list of names.
-
- Posts: 1
- Joined: Mon Sep 14, 2009 11:58 am
Re: Writing a JSynthLib driver
Writing a JSynthLib driver is actually hard when you're no experienced java developer.
__________________
Writing jobs
__________________
Writing jobs
Re: Writing a JSynthLib driver
Two weeks ago, I got a Yamaha CS2x from a friend who didn't use it.
Today I finished the librarian support for the CS2x.
The wiki I wrote while learning about programming java and jsynthlib has been a help already, but there's still much room for improvement.
If it's hard or not probably depends on the one who starts writing.
Last year I didn't know JSynthlib or couldn't program anything really. Now it takes just two weeks and I'm still editing wiki's while writing my driver, so in one week i could have done the job of providing library support.
I find the hardest thing about writing for JSynthLib that there is anybody who's an experienced Java developer, that is reading the JSynthLib-dev mailinglist. There's no place to go with questions.
I really don't get it actually, a hardware synth isn't some cheap thingy, it's a musical instrument. Musicians do want to get the most out of their instrument, but where are the sysex editors ? Professional drummers used the Roland SPD-11 for years, and there's no editor... no possibility to mix the drumkits using faders of a MIDI controller. ??? OK, the spd-11 is much older than JSynthLib, and JSynthLib is "easy". YMMV, maybe I am "intelligent", I doubt that!
edit: cs2x.wikispaces.com is also becoming an example to help ordering the sysex info from your synth's manual, if there was more feedback, I would do my best to make the spd-11 wiki better too, but ...
Today I finished the librarian support for the CS2x.
The wiki I wrote while learning about programming java and jsynthlib has been a help already, but there's still much room for improvement.
If it's hard or not probably depends on the one who starts writing.
Last year I didn't know JSynthlib or couldn't program anything really. Now it takes just two weeks and I'm still editing wiki's while writing my driver, so in one week i could have done the job of providing library support.
I find the hardest thing about writing for JSynthLib that there is anybody who's an experienced Java developer, that is reading the JSynthLib-dev mailinglist. There's no place to go with questions.
I really don't get it actually, a hardware synth isn't some cheap thingy, it's a musical instrument. Musicians do want to get the most out of their instrument, but where are the sysex editors ? Professional drummers used the Roland SPD-11 for years, and there's no editor... no possibility to mix the drumkits using faders of a MIDI controller. ??? OK, the spd-11 is much older than JSynthLib, and JSynthLib is "easy". YMMV, maybe I am "intelligent", I doubt that!
edit: cs2x.wikispaces.com is also becoming an example to help ordering the sysex info from your synth's manual, if there was more feedback, I would do my best to make the spd-11 wiki better too, but ...
Re: Writing a JSynthLib driver
I started writing a book from the info I gathered.
http://en.flossmanuals.net/bin/view/JSynthLib
http://en.flossmanuals.net/bin/view/JSynthLib