My Softがalphaから進まないわけは?

自分ネタです。
http://www.xucker.jpn.org/product/index.html
で自分の作ったJavaアプリ公開しているのですが、
自分で使う分には No Problem、人が使っているという話はあまり聞かない。
 Vectorとか窓の杜に登録しないとユーザー増えないが、
登録するほどの品質とオリジナル性がなくて困っている今日この頃
SWTのサンプル作る仕事とかあればいいんだけどねー

JavaでWavの部分再生簡単だなー。

テスト不十分だけど、ようは、byte skipすればいいみたい。
wavのミリ秒でのbyte量は
public static long countByteAt(AudioFormat format,long millisecond)
でいいと思う。

コード

/*
 * Created on 2004/10/03
 * License Apache2.0 or Common Public License
 */
package org.jpn.xucker.commons.audio;


import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException;


/**
 * 
 *
 */
public class JavaSoundAudioPlayer implements FileAudioPlayer,InputStreamAudioPlayer{

    

    /* (non-Javadoc)
     * @see org.jpn.xucker.commons.audio.sp.FileAudioPlayer#play(java.io.File)
     */
    public void play(File file) {
        try {
            // TODO Auto-generated method stub
            play(new FileInputStream(file));
        }catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    /* (non-Javadoc)
     * @see org.jpn.xucker.commons.audio.sp.AudioInputStreamPlayer#play(javax.sound.sampled.AudioInputStream)
     */
    public void play(InputStream stream) {
        try{
            AudioInputStream inputStream=AudioSystem.getAudioInputStream(stream);
            //AudioInputStream inputStream =
            // AudioSystem.getAudioInputStream(audioFile);
             AudioFormat format =inputStream.getFormat();

            DataLine.Info info = new DataLine.Info(SourceDataLine.class,format);
           SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);
           line.open(format);
           line.start();

            int readBytes = 0;
            byte[] bytedata = new byte[1024];
            while (readBytes != -1) {
             readBytes = inputStream.read(bytedata, 0, bytedata.length);
              if (readBytes >= 0) {
                //int writeBytes =
                  line.write(bytedata, 0, readBytes);
              }
            }
            line.drain();
            line.close();
            
            inputStream.close();
          }catch(Exception e){
              e.printStackTrace();
          }
    }
    
    public static long countByteAt(AudioFormat format,long millisecond){
        if(millisecond==0){
            return 0;
        }
        long rateIndex=(int)(format.getFrameRate()/1000*millisecond);
        
        return rateIndex*format.getSampleSizeInBits()/8*format.getChannels();
    }
    public void play(InputStream stream,long startmillisecond,long endmillisecond) {
        try{
            AudioInputStream inputStream=AudioSystem.getAudioInputStream(stream);
            //AudioInputStream inputStream =
            // AudioSystem.getAudioInputStream(audioFile);
             AudioFormat format =inputStream.getFormat();
             
             long startByte=countByteAt(format,startmillisecond);
             long endByte=countByteAt(format,endmillisecond);
             long playByte=endByte-startByte;
             
           DataLine.Info info = new DataLine.Info(SourceDataLine.class,format);
           SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);
           line.open(format);
           line.start();
           
           //skip
           inputStream.skip(startByte);
           
           
            int readBytes = 0;
            byte[] bytedata = new byte[1024];
            long readedByte=0;
            while (readBytes != -1) {
             readBytes = inputStream.read(bytedata, 0, bytedata.length);
              if (readBytes >= 0) {
                //int writeBytes =
                  if(readedByte+readBytes<playByte){
                  line.write(bytedata, 0, readBytes);
                  }else{
                      
                  line.write(bytedata, 0, Math.min((int)(playByte-readedByte),readBytes));
                  break;
                  }
                  readedByte+=readBytes;
              }
            }
            
            //System.out.println(readedByte);
            
            line.drain();
            line.close();
            
            inputStream.close();
          }catch(Exception e){
              e.printStackTrace();
          }
    }
}

JFTPを試す

http://www.jmethods.com/downloads/

InstallAnywhereの仕様のようだが
Zero G Registry というフォルダーをc:\program filesに作る
.com.zerog.registry.xml

理由はどうであれ隠しファイルを作るプログラムは好きじゃないので
InstallAnywhereを今後、使うことはないだろう。
このJFTPも、Freeだけどライセンスがちょっとな。Secure FTPそれほど使わないし
J日本にはFFFTPがあるしいいか。

マウスジェスチャ機能はWindowsでも必須なのかな?

mouseGestures
http://www.smardec.com/products/mouse.html

8ボタン マウス(5つボタンで十分だけど)を使うと、3つボタンに戻れないのと同じなのかな?
普通は3ボタンだしソフトでどうにかできるのは便利だとは思うけど、
いずれにせよマウスジェスチャー初心者にはむずかしいな。
ただユーザーインターフェースとして対応するべき機能ではあると思う。

音声のpitchを使ったボイスジェスチャーの方が興味あるけど
JavawavesurferのようなPitch取得のアルゴリズムよくわからんので作れない。