Shamisen Sheet Composer

Hey all!

I think I got an interesting idea last week and I would like to share it and know what you think about it.

As I am into application development and coding stuff, the thing that came to my mind was a software for creating Shamisen song sheets - you could say a Shamisen version of Guitar Pro. You could compose a song, listen to it and print it out in the first line. Later it might be possible to add features like sharing and listening tabs online.
And of course it would be free for all Bachido members - all the others would have to buy it for a 9999.99$ donation to Bachido :3

So before I start to put together a concept and list all of the cool features =)
What do you think?
Would it be helpfull or do you feel like it’s against tradition?

Let me know!

I’ve already started a bit on this idea actually! I work as a programmer. Currently all it does is taking a MIDI file and translating it to which string and position given what tuning you have and in what key you have tuned it in. When I emailed Kyle about this he said he had another friend who was also thinking of doing this! We haven’t had the chance to talk about it yet, but it sounds like we are more and more and that we should create an open source project as I’m sure there are more programmers who will be joining Bachido. I think with proper management every coder out there could contribute with something.

For my code I was using a free C# MIDI library, but I found it was a bit too tedious to work with and I started thinking that we should allow not only Windows users to use the software as Mac is pretty common when it comes to musicians and artists. And of course Linux users won’t be disappointed either. Therefore I’m thinking Java, as from the looks of it it has a pretty nice API for MIDI files. It also has synthesizer code so that you can play wave files based on the MIDI information, which is what we want.

Of course using a MIDI file is only one step. I just started the other day so I’ve just thought about how to load a midi file and make a tab from that. The actual interface to edit and create tabs on your own is something that also needs to be done but that I have postponed a bit.

What do you think about that setup?

And it’s not against tradition really. I don’t think all people can learn songs by ear or they might not play enough to get that good. In those cases a tool like this can be really useful. The obvious use case is to create tabs though.

I say it’s a great idea and would be a welcome program :D!

Haha, that’s great that there are already so many with the same idea!

Actually, I have also started a little bit …
(with bass.dll, c# and mp3s from Kyle’s tuning page =D - afaik bass.dll is also available for java and might also be usefull!)
So far I have tested it with the first half of Ringo Bushi… sounds pretty good for the first try xD

The multiplatform support is definitely one of the most important things to include as everyone should have the possibility to use it.

I would say, let’s think a bit more about it, gather ideas, discuss them and see what happens!
Karl, as you said, with multiple contributors and a good management it might turn into a great tool!

Hahahaha!!! This is so great! :smiley:

Web design and code is completely out of my field, but let me know if there’s any way I can help. :slight_smile:

Libor have you started with Java? I downloaded the newest version yesterday (I code C# and C++ at work) but then the soccer Champions League game came in the way :slight_smile:

Kyle, I think that’s ok, you have a big bunch of great qualities inside your field already xD

Karl, not really (just some really small tests) but as far as I know should be really easy to get into it if you are familiar with c#!
I’ll download and check it out later today ; )

Ah no coding Java is not a problem, it’s just that I haven’t touched it since a couple of years ago since I started at this job. I must say that I do not know how easy it will be to build a nice dynamic editing window though. I will start by checking the MIDI stuff out.

Also, do you have any preference for IDE, Eclipse or Netbeans? I really don’t know which one is the best these days.

Hehe, that might become quite interesting :3
I will try to play around with the visual elements java has to offer and see what can be done - I don’t know how about you but and I already see myself annoyed by not being able to use c# + wpf in visual studio xD

Regarding IDE, i have really no idea… I have worked a little bit with Netbeans and it felt quite solid, but there seem to be many positive comments for both IDEs so I assume it’s just a matter of getting used to one of them. Let me know if you find a hint why one of them might be better for the project, I’ll also keep my eyes open.

I’ve converted my code to Java. Its MIDI API is really nice. I’ve been playing around with Eclipse and found that it seem to have most of the nice features in VS. I don’t know about NetBeans, guess I’ll import the files and try it out tomorrow as well. I think the major reason for selecting one over the other would be how much GUI design help it has.

Libor had you already sampled a shamisen and used it to play MIDI files? That would be my plan for tomorrow if you haven’t already done that. If Java works as I hope, it’s a simple matter of loading a wave file and telling the sound bank what frequency it’s at. Then I hope it also contains code to change the pitch of the audio file.

Example output currently from a midi file I created. From the note and its octave, it makes a quick analysis of where on the sao it should be played. The positions are Tsugaru positions, and not guitar fret positions (in this example the only thing that differs is the Tsugaru position 4, which would be the fifth fret on a guitar). Also currently it just tunes itself so that the lowest note if finds will be the key the shamisen is tuned in. We will obviously want settings like “show how to play it in the same key” and “Show me the best way to play the song, even if it means changing the key”.

Output for Track 1:
A 4 String: 3 Position: 0
D 4 String: 1 Position: 4
A 4 String: 3 Position: 0
D 4 String: 1 Position: 4
A 4 String: 3 Position: 0
B 4 String: 3 Position: 2
C 5 String: 3 Position: 3
B 4 String: 3 Position: 2
A 4 String: 3 Position: 0
D 5 String: 3 Position: 4
D 5 String: 3 Position: 4
D 5 String: 3 Position: 4
A 4 String: 3 Position: 0
B 4 String: 3 Position: 2
C 5 String: 3 Position: 3
A 3 String: 1 Position: 0
B 4 String: 3 Position: 2
B 3 String: 1 Position: 2
A 4 String: 3 Position: 0
C 4 String: 1 Position: 3
G 4 String: 2 Position: 3
D 4 String: 1 Position: 4
F 4 String: 2 Position: 1

Of course the timestamp information is available, and the volume. For the GUI we simply need to loop through these MidiEvents and create a wrapper class that can be used by the GUI framework for presentation and editing.

I’ve converted my code to Java. Its MIDI API is really nice. I’ve been playing around with Eclipse and found that it seem to have most of the nice features in VS. I don’t know about NetBeans, guess I’ll import the files and try it out tomorrow as well. I think the major reason for selecting one over the other would be how much GUI design help it has.

I will also test the IDEs this evening, let me know when you have already an opinion on them.

Libor had you already sampled a shamisen and used it to play MIDI files? That would be my plan for tomorrow if you haven’t already done that. If Java works as I hope, it’s a simple matter of loading a wave file and telling the sound bank what frequency it’s at. Then I hope it also contains code to change the pitch of the audio file.

For my testing I have used Kyle’s samples from the tuning page ; )
I have used a simple note schema, which holds all the information i thought to be needed for shamisen notes. Then I looped through a list of those notes and played them with the corresponding pitch. I will upload the test project this evening.
Regarding midi, what about Suri, Sukui, Hajiki etc. can that be marked in a midi somehow?

Example output currently from a midi file I created. From the note and its octave, it makes a quick analysis of where on the sao it should be played. The positions are Tsugaru positions, and not guitar fret positions (in this example the only thing that differs is the Tsugaru position 4, which would be the fifth fret on a guitar). Also currently it just tunes itself so that the lowest note if finds will be the key the shamisen is tuned in. We will obviously want settings like “show how to play it in the same key” and “Show me the best way to play the song, even if it means changing the key”.
Output for Track 1:
A 4 String: 3 Position: 0
D 4 String: 1 Position: 4
A 4 String: 3 Position: 0
D 4 String: 1 Position: 4
A 4 String: 3 Position: 0
B 4 String: 3 Position: 2
C 5 String: 3 Position: 3
B 4 String: 3 Position: 2
A 4 String: 3 Position: 0
D 5 String: 3 Position: 4
D 5 String: 3 Position: 4
D 5 String: 3 Position: 4
A 4 String: 3 Position: 0
B 4 String: 3 Position: 2
C 5 String: 3 Position: 3
A 3 String: 1 Position: 0
B 4 String: 3 Position: 2
B 3 String: 1 Position: 2
A 4 String: 3 Position: 0
C 4 String: 1 Position: 3
G 4 String: 2 Position: 3
D 4 String: 1 Position: 4
F 4 String: 2 Position: 1

Of course the timestamp information is available, and the volume. For the GUI we simply need to loop through these MidiEvents and create a wrapper class that can be used by the GUI framework for presentation and editing.

First minimalistic overview: what we need first is a schema/class for shamsen notes, from there we can create a “midi to notes” & “notes to midi” adapter, then a basic gui (note control, sheet control that holds the notes), then “notes to gui” and “gui to notes” module. Then we can play around with the gui and it’s workflow.

There are ways to store it. The question is whether to store it in a way that the MIDI file can be played externally and sound like it or if we can only use the information for our program. Vibrato and sliding (suri) can be done without problems in MIDI. I had planned on some markings like Sukui and being noted in another file next to the midi file, but we can store this in some way as well.

Will be interesting to listen to your shamisen tool. As I understand it you have loaded audio files that you change the pitch of and then you have coded the song without MIDI?

hmm, I am not sure if its a good solution to have two files. What do you think if we make our own format (e.g. a simple xml format) and add export and import of midi later? ; )

Here’s the link, but don’t expect great code or sound, it was really just to test if it might work : D I think with some tweaking it might sound quite good. For beating the skin I have implemented just the first drum sound I was able to find.
Also the real tsugaru position 4 has been ignored xD

https://skydrive.live.com/redir.aspx?cid=25d335c7e775790a&resid=25D335C7E775790A!269&parid=25D335C7E775790A!268

The project contains just a button that plays the song and a simple visualization of it. The executable is under “Shamisen\Shamisen\bin\Debug” if someone without visual studio is interested. Hope there is no problem with the dlls references…

I downloaded it and ran the code. I only have Visual Studio 2008 so couldn’t open the solution. I checked the code outside of VS and ran the debug file. It worked.

I have investigated Java a bit more. It seems we have to create our own Synthesizer. That includes consuming MidiEvents and doing stuff with it. Nothing strange there really, but we need to use either Bass (if it has java) or Java’s own audio classes and play sound on our own like you have.

Karl, what do you think about creating saving the notes in our own format and the possibility to export/import midi later? I think for the start midi is not that important or did I miss something?

What do you say about my note scheme, I think it contains everything shamisen sheets contain. It could be used as the interface between midi and the app or for the app’s own fileformat. Also having this defined it would be possible to start designing the gui and it’s behaviors.

the fields are:
ichi, ni, san, type, finger, length, suri

ichi, ni, san contains the position (e.g. 0, 5,10)
type can be Hajiki, Stop, Sukui, … (e.g. 0 for Hajiki)
finger is the number of finger used for the tone (1=I, 2=II, 3=III)
length can be 1/1, 1/2, 1/4
suri contains a number; e.g. a 2 means that the slide goes to the second note after the current (I did not find any case which could not be covered by this but there might be one)

Then a song is just a list of those notes and some song specific information.

Any new opinions about java and the technologies we will need?

Do you have Skype? I think we can progress faster that way, and we don’t have to bring this topic to the top of the forum every day since I think its some time left until it will be interesting for all the players.

I’m sending my skype in a PM to you.

I can say this about Java though. Last evening I found out that we will have to do what you have done with bass on our own in Java. The synthesizer that is provided is just a General Midi synth, and it can’t be altered really. I still think we should use the whole interface and create our own synthesizer, implementing the Synthesizer interface.

As for your question about MIDI, it is not necessary to use MIDI for this. My initial approach was to first create a program that created shamisen notation from MIDI files, so that is why I want to do that.

Since we need to do something similar to your code on our own to play our own shamisen sounds, I say you can continue with your approach. If you create an interface for the code that registers a note, I can later just make a MIDI implementation and it will work wonders.

So as I see it now, you can go with your flow and work on a GUI Editor and mapping your notation to showing images etc, if that is what you had planned. I will continue to work on the MIDI part, meaning we will be able to to do lots of other stuff later on.

This is a great idea, guys!
Though most of this thread is lost on me, I’m looking forward to the end result -
I’ve been laboriously making scores for a long time. Since I have no programming skills at all, I was forced to use Microsoft’s Paint program to create a template containing a full page of blank 3-lined staffs and all the symbols that you come across in shamisen music. From there it is all cutting and pasting to make a new score.

I have a couple of suggested additions to make to Libor’s list of actions:

Suberi: this might not be necessary for playback, but it is important be able to put it in the score.

Triplet note value: for example in the “430” jongara riff.

Rest symbols: of varying lengths. You might have already thought of this, but I’m throwing it in just in case.

I’ve been laboriously making scores for a long time. Since I have no programming skills at all, I was forced to use Microsoft’s Paint program to create a template containing a full page of blank 3-lined staffs and all the symbols that you come across in shamisen music. From there it is all cutting and pasting to make a new score.

Oh no that must have been painful :X

I have a couple of suggested additions to make to Libor’s list of actions:

Good point: Might be hard to suggest something before the first version is out but if anyone has suggestions or ideas, please let us know!

Suberi: this might not be necessary for playback, but it is important be able to put it in the score.

My main objective for the moment is sheet visualization so it will be definitely included ; )
(actually it will be stored in the suri field - but I have to check if that works in any case)

Triplet note value: for example in the “430” jongara riff.

Aah thanks for this!!
To be honest I do no know what that is, could someone explain that to me

Rest symbols: of varying lengths. You might have already thought of this, but I’m throwing it in just in case.

Rest is already included :3

Thank you very much!

The 430 triplet is visualized in Kyle’s book as the number 4 3 0 close to eachother, hajiki under 3 and 0, and an arc over them with a 3 on it. Basically in guitar vocabulary you are performing 2 pull offs.

Personally when I first saw it I thought it was some kind of Suri combined with the hajiki, but I guess it’s more of a rhythm thing to clarify how the part is played. But I guess its the standard so we’ll go with it?